论坛全局菜单下方 - TICKMILL 285X70论坛全局菜单下方 - ThinkMarkets285X70论坛全局菜单下方 - 荔枝返现285X70论坛全局菜单下方 -  icmarkets285X70
查看:1364回复:0
草龙
注册时间2004-12-17
[MT4指标]达玛系统指示灯
楼主发表于:2014-09-28 18:38只看该作者倒序浏览
1楼 电梯直达
电梯直达
主图指标 附图指标, mt4指标类型:趋势指标 是否能用在mt4手机版上:否 mt4指标类型:震荡指标 是否能用在mt4手机版上:否 是否含有未来函数:无 //+------------------------------------------------------------------+ //| Darma System Indicator (beta).mq4 | //| [email protected] | //| | //+------------------------------------------------------------------+ /*README This indicator is supposed to be a conversion of Darma\'s set of indicators from MT3 to MT4. This conversion is not exactly the same though. In the MT3 version, the indicators were split up between 4 separate custom indicator files. This MT4 version has all the logic combined into one file. Due to this consolidation, some of the logic did not translate exactly as intended. Also, I only did a direct code translation. Prior to looking at the code in the MT3 files, I had no understanding of the logic behind the indicator files. If someone could provide the logic in human language, I might be able to make this indicator behave more properly as well as be a little more programmatically elegant. Test this indicator out according to Darma\'s original rules and see how it does for you. Darma\'s Rules: BUY: 1. When red stop dot (above price) becoming a blue stop dot (below price), the mood is ready for a buy. 3. Wait for the bar becoming blue. Sometime it happens in the same time, but sometime need to wait. 4. After you have a blue bar, Wait that blue bar closed completely. 5. Then place order to buy at 10-15 pips above the high of that blue bar. SELL: 1. When bule stop dot (below price) becoming a red stop dot (above price), the mood is ready for a sell. 3. Wait for the bar becoming red. Sometime it happens in the same time, but sometime need to wait. 4. After you have a red bar, Wait that red bar closed completely. 5. Then place order to sell at 10-15 pips below the low of that red bar. PS. This code is very ugly and inelegant. I would like to fix this by getting system rules in english. - [email protected] */ #property copyright \"[email protected]\" #property link \"\" #property indicator_chart_window #property indicator_buffers 4 //---- input parameters extern int WingDings_Symbol = 108; //---- buffers double Buffer1; double Buffer2; double Buffer3; double Buffer4; double Buffer5; double Buffer6; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,2,Blue); SetIndexBuffer(0,Buffer1); SetIndexLabel(0,\"Blue Bar\"); SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,2,Red); SetIndexBuffer(1,Buffer2); SetIndexLabel(1,\"Red Bar\"); SetIndexStyle(2,DRAW_ARROW,STYLE_DOT,2,Blue); SetIndexBuffer(2,Buffer3); SetIndexLabel(2,\"Blue Dot\"); SetIndexArrow(2,WingDings_Symbol); SetIndexStyle(3,DRAW_ARROW,STYLE_DOT,2,Red); SetIndexBuffer(3,Buffer4); SetIndexLabel(3,\"Red Dot\"); SetIndexArrow(3,WingDings_Symbol); //SetIndexStyle(4,DRAW_SECTION,STYLE_SOLID,1,Blue); //SetIndexBuffer(4,Buffer5); //SetIndexLabel(4,\"Blue\"); //SetIndexStyle(5,DRAW_SECTION,STYLE_SOLID,1,Red); //SetIndexBuffer(5,Buffer6); //SetIndexLabel(5,\"Red\"); //---- return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- TODO: add your code here //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); //---- TODO: add your code here int adjustment=0; //change this value to make the indicator behave slightly differently. valid values are 0-4. int periods=3; int extremes=0; double smin, smax, SsMax, SsMin, pivothi, pivotlo, margins; bool flag1, flag2; for(int i=0;ismin && pivothi>smax) flag1=true; else flag1=false; if(pivothiHigh) Buffer4=sig; /* double sig2=iSAR(NULL,0,1,0.2,i); if(sig2High) {Buffer6=sig2; Buffer5=-1;} */ }//end for //---- return(0); } //+------------------------------------------------------------------+
TK29帖子1楼右侧xm竖版广告90-240
个性签名

阅尽天下指标
搬砖开始,始于2014

广告
TK30+TK31帖子一樓廣告
TK30+TK31帖子一樓廣告

本站免责声明:

1、本站所有广告及宣传信息均与韬客无关,如需投资请依法自行决定是否投资、斟酌资金安全及交易亏损风险;

2、韬客是独立的、仅为投资者提供交流的平台,网友发布信息不代表韬客的观点与意思表示,所有因网友发布的信息而造成的任何法律后果、风险与责任,均与韬客无关;

3、金融交易存在极高法律风险,未必适合所有投资者,请不要轻信任何高额投资收益的诱导而贸然投资;投资保证金交易导致的损失可能超过您投入的资金和预期。请您考虑自身的投资经验及风险承担能力,进行合法、理性投资;

4、所有投资者的交易帐户应仅限本人使用,不应交由第三方操作,对于任何接受第三方喊单、操盘、理财等操作的投资和交易,由此导致的任何风险、亏损及责任由投资者个人自行承担;

5、韬客不隶属于任何券商平台,亦不受任何第三方控制,韬客不邀约客户投资任何保证金交易,不接触亦不涉及投资者的任何资金及账户信息,不代理任何交易操盘行为,不向客户推荐任何券商平台,亦不存在其他任何推荐行为。投资者应自行选择券商平台,券商平台的任何行为均与韬客无关。投资者注册及使用韬客即表示其接受和认可上述声明,并自行承担法律风险。

版权所有:韬客外汇论坛 www.talkfx.com 联络我们:[email protected]