论坛全局菜单下方 - TICKMILL 285X70论坛全局菜单下方 - ThinkMarkets285X70论坛全局菜单下方 - 荔枝返现285X70论坛全局菜单下方 -  icmarkets285X70
查看:813回复:4
草龙
注册时间2004-12-17
[MT4指标]DayImpuls指标
楼主发表于:2014-06-22 20:52只看该作者倒序浏览
1楼 电梯直达
电梯直达
附图指标, mt4指标类型:趋势指标 是否能用在mt4手机版上:否 是否含有未来函数:无 //+------------------------------------------------------------------+ //| DayImpuls_T3_v2.mq4.mq4 //| //| http://www.arkworldmarket.ru/forum/showthread.php?t=966&page=2&pp=10 //+------------------------------------------------------------------+ // Modest 漕徉忤? 胥豚骅忄龛? 镱 戾蝾潴 t3. 念徉忤? 赅磬臌. // 央邈赅 桤戾龛? 嚯泐痂蜢, 黩钺? 镱??蝽邋 忸耧痂龛爨腭? 觐?. 袜 耋螯 铕桡桧嚯? 礤 怆??弪 腿世?. // 俞桊噱? 腓   沭圄桕?, 忖钿桁 箫疣怆屙桢 疱骅祛? 铗钺疣驽龛? // DisplayMode=0 悟钺疣驵 ?? DayImpuls ? 耠噫屙磬? 牮桠?? // DisplayMode=1 悟钺疣驵 ?? 蝾朦觐 DayImpuls // DisplayMode=2 悟钺疣驵 ?? 蝾朦觐 耠噫屙磬? 牮桠?? #property copyright \"\" #property link \"http://www.arkworldmarket.ru/forum/showthread.php?t=966&page=2&pp=10\" #property indicator_separate_window #property indicator_buffers 7 #property indicator_color1 Indigo #property indicator_level1 0.0 //---- input parameters extern int per=14; extern int d=100; extern int t3_period=8; extern double b=0.7; //extern ChanPercent=70; extern int DisplayMode=0; //---- buffers double DayImp; double t3; //double MaxH; //double MinH; double MaxLine; double MinLine; double ChanLineMax; double ChanLineMin; double Level; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators if (DisplayMode>2 || DisplayMode<0) DisplayMode=0; switch ( DisplayMode ) { case 0: SetIndexStyle(0,DRAW_LINE,EMPTY,1,Magenta); SetIndexBuffer(0,DayImp); SetIndexStyle(1,DRAW_LINE,EMPTY,2,Red); SetIndexBuffer(1,t3); break; case 1: SetIndexStyle(0,DRAW_LINE,EMPTY,1,Magenta); SetIndexBuffer(0,DayImp); SetIndexStyle(1,DRAW_NONE,EMPTY,2,Red); SetIndexBuffer(1,t3); break; case 2: SetIndexStyle(0,DRAW_NONE); SetIndexBuffer(0,DayImp); SetIndexStyle(1,DRAW_LINE,EMPTY,2,Red); SetIndexBuffer(1,t3); break; default: SetIndexStyle(0,DRAW_LINE,EMPTY,1,Magenta); SetIndexBuffer(0,DayImp); SetIndexStyle(1,DRAW_LINE,EMPTY,2,Red); SetIndexBuffer(1,t3); break; } /* SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,DayImp); SetIndexStyle(1,DRAW_LINE,EMPTY,2,Red); SetIndexBuffer(1,t3); */ SetIndexStyle(2,DRAW_LINE,EMPTY,2,Goldenrod); SetIndexBuffer(2,MaxLine); SetIndexStyle(3,DRAW_LINE,EMPTY,2,Goldenrod); SetIndexBuffer(3,MinLine); SetIndexLabel(0,NULL); SetIndexLabel(1,NULL);SetIndexLabel(2,NULL);SetIndexLabel(3,NULL); SetIndexLabel(4,NULL);SetIndexLabel(5,NULL); SetIndexStyle(4,DRAW_LINE,EMPTY,2,DarkGreen); SetIndexBuffer(4,ChanLineMax); SetIndexStyle(5,DRAW_LINE,EMPTY,2,DarkGreen); SetIndexBuffer(5,ChanLineMin); SetIndexStyle(6,DRAW_LINE,EMPTY,1,Blue); SetIndexBuffer(6,Level); //---- return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); int shift,i,N; double imp,mBar,Max,Min; double e1,e2,e3,e4,e5,e6,c1,c2,c3,c4,n,w1,w2, b2,b3,dpo,Prise,k; //SetLoopCount(0); // loop from first bar to current bar (with shift=0) //=========================================== 蒡? ? 箧? 磬觐脶囫桦 t3: =============== //=========================================== 络?? 蜩镱忸? 觐? =============== if(Bars<=t3_period) return(0); //---- initial zero if(counted_bars0) counted_bars--; limit=Bars-counted_bars; //---- main loop for(shift=0; shift=0; shift--) { imp=0; Level[shift]=0.0; for( i=shift ;i<=shift+per; i++) { imp=imp+(Open-Close); } imp=MathRound(imp/Point); if (imp==0 )imp=0.0001; if (imp!=0 ) { imp=-imp; DayImp[shift]=imp; } //for( i=shift ;i<=shift+per; i++) // DayImp[shift]=iMA(NULL,0,14,0,MODE_SMMA,PRICE_HIGH,i); // ==================================== 蒡? ? 箧? 磬觐脶囫桦 t3: ======================== dpo=DayImp[shift]; e1 = w1*dpo + w2*e1; e2 = w1*e1 + w2*e2; e3 = w1*e2 + w2*e3; e4 = w1*e3 + w2*e4; e5 = w1*e4 + w2*e5; e6 = w1*e5 + w2*e6; t3[shift] = c1*e6 + c2*e5 + c3*e4 + c4*e3; // ==========^^^====================== 蒡? ? 箧? 磬觐脶囫桦 t3: ====^^^================ switch ( Period() ) { case 5: N=288; break; case 15: N=96; break; case 30: N=48; break; case 60: N=24; break; default: N=0; break; } if (N==0) {Alert(\"Work only in M15,M30,M60 timeframes\");return(0);} Max=DayImp[shift+N-1]; Min=DayImp[shift+N-1]; for( i=shift ;i<=shift+N-1; i++) { if (MaxDayImp) Min=DayImp; } //MaxH[shift]=Max;//+(Max-Min)*(1-kChannel); //MinH[shift]=Min;//+(Max-Min)*(kChannel); MaxLine[shift]=Max;//+(Max-Min)*(1-kChannel); MinLine[shift]=Min;//+(Max-Min)*(kChannel); //k=((100-ChanPercent)/2)/100; ChanLineMax[shift]=Max/2; // Min+(Max-Min)*(1-k); ChanLineMin[shift]=Min/2; //Min+(Max-Min)*(k); } //---- //---- return(0); } //+------------------------------------------------------------------+
TK29帖子1楼右侧xm竖版广告90-240
个性签名

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

广告
TK30+TK31帖子一樓廣告
TK30+TK31帖子一樓廣告
goodday
注册时间2016-12-06
发表于:2016-12-07 10:14只看该作者
3楼
谢楼主的分享
hudie
注册时间2016-12-09
Pzxzx
注册时间2017-08-06

本站免责声明:

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

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

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

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

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

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