论坛全局菜单下方 - TICKMILL 285X70论坛全局菜单下方 - ThinkMarkets285X70论坛全局菜单下方 - 荔枝返现285X70论坛全局菜单下方 -  icmarkets285X70
查看:1888回复:6
草龙
注册时间2004-12-17
[MT4指标]圆形震荡阻力线
楼主发表于:2014-04-10 08:13只看该作者倒序浏览
1楼 电梯直达
电梯直达
主图指标 mt4指标类型:震荡指标 是否能用在mt4手机版上:否 是否含有未来函数:无 暂时没看出使用的原理 需要做详细的研究才可以的 //+------------------------------------------------------------------+ //| Golden_section_v2.mq4 | //| Talex | //| [email protected] | //+------------------------------------------------------------------+ // Very rough English translation by http://translation2.paralink.com/ // Feel free to translate the rest of the comments. #property copyright "Talex" #property link "[email protected]" #property indicator_chart_window #property indicator_buffers 1 #property indicator_color1 Lime extern int ExtDepth=8; /* Parameter for ZZ */ /*extern*/ int ExtIndicator=0; /* Defines ? which will search for points for construction of a pattern while only 0 */ extern double ExtDopusk=0.01; /* 镟疣戾蝠? 镟蝌屦磬 狍潴? 铗腓鬣螯?? 礤 犷脲? 麇? 忮腓麒磬 ExtDopusk */ extern int ExtPoint=3; /* 麒耠? 聍栩噱禧? 蝾麇? 镥疱腩爨, 羼腓 皲咫囹? 犷朦  3, 蝾 忸珈铈眍 耱痤栩? 铗 膻犷? 蝾麝? 镥疱腩爨 */ extern string ExtComplect="0"; /*  ? 潆? 蝾泐,黩钺? 恹忸滂螯 礤耜铍 ? 桧滂赅蝾痤? 磬 沭圄桕? */ extern int ExtMovePoint=0; /*镥疱戾耱栩? 蝾麝? 铗痂耦怅? 忮屦? 铗 忤? 磬 觐腓麇耱忸 徉痤? 箨噻囗眍? 镥疱戾眄铋 */ extern bool ExtPitchfork=true; /* 桉镱朦珞弪?? 镱耱痤屙桢 ? 镱祛 ? 忤? */ extern bool ExtPitchforkRevers=false; /* 镥疱忸疣麒忄弪 忮龛?, 玎麇?? 耧痤耔蝈 Vadimcha */ extern bool ExtBack=true; /* 羼腓 true, 蝾 钺 牝? 狍潴? 镱赅玎睇 ? 纛眍忸? 疱骅戾 */ extern bool ExtFan=true; /* 羼腓 true, 蝾 翳犷忮龛? 狍溴? 恹忮溴? 磬 沭圄桕 */ extern bool ExtRec=true; /* 羼腓 true, 蝾 镳?祛筱铍 桕 狍溴? 恹忮溴? 磬 沭圄桕 */ extern bool ExtArc=true; /* 羼腓 true, 蝾 翳犷囵赅 狍溴? 恹忮溴磬 磬 沭圄桕 */ extern bool ExtLeftChannel=false; /* 羼腓 true, 蝾 腓龛? 赅磬豚 狍潴? 恹忮溴睇 磬 沭圄桕 */ extern bool ExtRightChannel=false; /* 羼腓 true, 蝾 腓龛? 赅磬豚 狍潴? 恹忮溴睇 磬 沭圄桕 */ extern double ExtFiboLeftChannel=1.618; /* 篑蜞磬怆桠噱? 翳犷 蝾麝? 镱耱痤屙?? 脲恹? 腓龛? */ extern double ExtFiboRightChannel=1.618; /* 篑蜞磬怆桠噱? 翳犷 蝾麝? 镱耱痤屙?? 镳噔  腓龛? */ extern bool ExtSave=false; /* 羼腓 true, 蝾 镱耱痤屙?? 狍潴? 耦躔囗屙? 磬 沭圄桕? */ extern double ExtScale=0; /* 篑蜞磬怆桠噱? 爨聒蜞? 潴汨 */ extern int ExtFanStyle=0; /* 篑蜞磬怆桠噱? 耱桦? 腓龛? 翳犷忮龛赅 */ extern int ExtFanWidth=1; /* 篑蜞磬怆桠噱?  痂眢 腓龛? 翳犷忮龛赅 */ extern color ExtFanColor=DeepPink; /* 鲡弪 翳犷忮龛觐? */ extern int ExtRecStyle=4; /* 篑蜞磬怆桠噱? 耱桦? 腓龛? 镳?祛筱铍 桕? */ extern int ExtRecWidth=1; /* 篑蜞磬怆桠噱?  痂眢 腓龛? 镳?祛筱铍 桕? */ extern color ExtRecColor=Yellow; /* 鲡弪 镳?祛筱铍 桕? */ extern int ExtArcStyle=0; /* 篑蜞磬怆桠噱? 耱桦? 腓龛? 翳犷囵觇 */ extern int ExtArcWidth=1; /* 篑蜞磬怆桠噱?  痂眢 腓龛? 翳犷囵觇 */ extern color ExtArcColor=Red; /* 鲡弪 潴汨 */ extern int ExtChannelStyle=0; /* 篑蜞磬怆桠噱? 耱桦? 腓龛? 赅磬豚 */ extern int ExtChannelWidth=1; /* 篑蜞磬怆桠噱?  痂眢 腓龛? 赅磬豚 */ extern color ExtChannelColor=Blue; /* 鲡弪 腓龛? 赅磬豚 */ extern int ExtPitchforkStyle=0; /* 篑蜞磬怆桠噱? 耱桦? 腓龛? 忤? */ extern int ExtPitchforkWidth=1; /* 篑蜞磬怆桠噱?  痂眢 腓龛? 忤? */ extern color ExtPitchforkColor=Lime; /* 鲡弪 忤? */ /* 丸驽 觐铕滂磬螓 蝾麇? 祛骓? 忖钿栩? 痼麝囔? */ extern datetime TimePointX=0; /* 怵屐? 蝾麝? X ? 纛痨囹? '1980.07.19 12:30' */ extern datetime TimePointA=0; /* 怵屐? 蝾麝? A ? 纛痨囹? '1980.07.19 12:30' */ extern datetime TimePointB=0; /* 怵屐? 蝾麝? B ? 纛痨囹? '1980.07.19 12:30' */ extern double FiboFanMediana1=0.382; extern double FiboFanMediana2=1.272; extern double Fibo1=0.0; extern double Fibo2=0.382; extern double Fibo3=0.5; extern double Fibo4=0.618; extern double Fibo5=0.786; extern double Fibo6=0.886; extern double Fibo7=1.0; extern double Fibo8=1.272; extern double Fibo9=1.618; extern double Fibo10=2.0; extern double Fibo11=2.618; /* 杨忮? - 磬耱痤轵? 潆? 皴?? 鲡弪, 耱桦?,  痂眢 腓龛? 钺 牝钼, 翳犷-箴钼龛 ? 筢屦栩? 镥疱? 耦铗忮蝰蜮簋 扈 镟疣戾蝠囔? extern */ double zz; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { IndicatorBuffers(1); SetIndexBuffer(0,zz); SetIndexStyle(0,DRAW_SECTION); SetIndexEmptyValue(0,0.0); return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- int i; for(i=0;i<=ExtDepth;i++) { ObjectDelete("FiboFan1"+"_"+i+"_"+ExtComplect+"_"); ObjectDelete("FiboFan2"+"_"+i+"_"+ExtComplect+"_"); ObjectDelete("FiboArc"+"_"+i+"_"+ExtComplect+"_"); ObjectDelete("Rectangle"+"_"+i+"_"+ExtComplect+"_"); ObjectDelete("LeftChannel"+"_"+i+"_"+ExtComplect+"_"); ObjectDelete("RightChannel"+"_"+i+"_"+ExtComplect+"_"); ObjectDelete("LeftLine"+"_"+i+"_"+ExtComplect+"_"); ObjectDelete("RightLine"+"_"+i+"_"+ExtComplect+"_"); ObjectDelete("Pitchfork"+"_"+i+"_"+ExtComplect+"_"); ObjectDelete("Mediana"+"_"+i+"_"+ExtComplect+"_"); } //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int PP; int i,j,X,A,B; double R0382=0.382, R0786=0.786, retXB, minret, maxret,AutoScale; double p1,p2,p3,p4,p5,p6,p7; datetime t1,t2,t3,t4,t5,t6,t7; string save=""; double tang; if(ExtSave==true) { save=TimeToStr(TimeLocal(),TIME_DATE|TIME_SECONDS); } minret=1-ExtDopusk; maxret=1+ExtDopusk; ArrayResize(PP,ExtPoint); if(TimePointX!=0 && TimePointA!=0 && TimePointB!=0) { ExtPoint=3; PP[0]=iBarShift(NULL,0,TimePointB); PP[1]=iBarShift(NULL,0,TimePointA); PP[2]=iBarShift(NULL,0,TimePointX); if((High[PP[0]]>High[PP[1]] && High[PP[2]]>High[PP[1]]) || (Low[PP[0]]>Low[PP[1]] && Low[PP[2]]>Low[PP[1]])) { zz[PP[0]]=High[PP[0]]; zz[PP[1]]=Low[PP[1]]; zz[PP[2]]=High[PP[2]]; }else { zz[PP[0]]=Low[PP[0]]; zz[PP[1]]=High[PP[1]]; zz[PP[2]]=Low[PP[2]]; } } else { switch (ExtIndicator) { case 0: {ZZTalex(ExtDepth); break;} /* 玟羼? 祛骓? 漕徉怆?螯 趔黻鲨? 镱 疣聍弪? 蝾麇? 镟蝌屦眍? */ default:{ZZTalex(ExtDepth); break;} } if(ExtIndicator==0) { j=0; for(i=0;izz[PP[ExtPoint-3]] && zz[PP[ExtPoint-3]]>zz[PP[ExtPoint-2]])) { retXB=(zz[PP[ExtPoint-2]]-zz[PP[ExtPoint-3]])/(zz[PP[ExtPoint-2]]-zz[PP[ExtPoint-1]]+0.000001); if(retXB>=R0382*minret && retXB<=R0786*maxret) { t1=Time[PP[ExtPoint-1]];p1=zz[PP[ExtPoint-1]]; t2=Time[PP[ExtPoint-3]];p2=zz[PP[ExtPoint-3]]; if(2*PP[ExtPoint-3]-PP[ExtPoint-1]<=0) { t3=Time[0]-(2*PP[ExtPoint-3]-PP[ExtPoint-1])*Period()*60;p3=zz[PP[ExtPoint-3]]-(zz[PP[ExtPoint-1]]-zz[PP[ExtPoint-3]]); } else {t3=Time[2*PP[ExtPoint-3]-PP[ExtPoint-1]];p3=zz[PP[ExtPoint-3]]-(zz[PP[ExtPoint-1]]-zz[PP[ExtPoint-3]]);} } } if(ExtScale==0) {/* 疣聍弪 AutoScale 镳邃腩骅? Vadimcha ? 礤祗 怦? 忸镳铖? */ AutoScale=MathAbs((p1-p3)*MathPow(10,Digits)/(2*(PP[ExtPoint-1]-PP[ExtPoint-3]))); }else AutoScale=ExtScale; CreateObject(p1,p2,p3,t1,t2,t3,save,AutoScale); } if(ExtPitchfork) { t1=Time[PP[ExtPoint-1]];p1=zz[PP[ExtPoint-1]]; t2=Time[PP[ExtPoint-2]];p2=zz[PP[ExtPoint-2]]; t3=Time[PP[ExtPoint-3]];p3=zz[PP[ExtPoint-3]]; p4=(zz[PP[ExtPoint-2]]+zz[PP[ExtPoint-3]])/2; ObjectCreate("Pitchfork"+"_"+ExtDepth+"_"+ExtComplect+"_"+save,OBJ_PITCHFORK,0,t1,p1,t2,p2,t3,p3); ObjectSet("Pitchfork"+"_"+ExtDepth+"_"+ExtComplect+"_"+save,OBJPROP_BACK,ExtBack); ObjectSet("Pitchfork"+"_"+ExtDepth+"_"+ExtComplect+"_"+save,OBJPROP_COLOR,ExtPitchforkColor); ObjectSet("Pitchfork"+"_"+ExtDepth+"_"+ExtComplect+"_"+save,OBJPROP_STYLE,ExtPitchforkStyle); ObjectSet("Pitchfork"+"_"+ExtDepth+"_"+ExtComplect+"_"+save,OBJPROP_WIDTH,ExtPitchforkWidth); tang=(p1-p4)/(PP[ExtPoint-1]-(PP[ExtPoint-2]-(PP[ExtPoint-2]-PP[ExtPoint-3])/2.0)); t5=t3; p5=p1-tang*(PP[ExtPoint-1]-PP[ExtPoint-3]); ObjectCreate("Mediana"+"_"+ExtDepth+"_"+ExtComplect+"_"+save,OBJ_TREND,0,t1,p1,t5,p5); ObjectSet("Mediana"+"_"+ExtDepth+"_"+ExtComplect+"_"+save,OBJPROP_BACK,ExtBack); ObjectSet("Mediana"+"_"+ExtDepth+"_"+ExtComplect+"_"+save,OBJPROP_COLOR,ExtPitchforkColor); if((p1p2 && p1>p4)) { /* ?  铎 耠篦噱 耦怙噤篁 箴钼龛 戾礤? 100% */ p6=(p5-p3)/FiboFanMediana1+p3;//-tang*ExtMovePoint; if(ObjectGetShiftByValue("Mediana"+"_"+ExtDepth+"_"+ExtComplect+"_"+save,p6)<-100) { Alert("The point for construction of a fan to be too far, try to use greater value for FiboFanMediana1"); } if(ObjectGetShiftByValue("Mediana"+"_"+ExtDepth+"_"+ExtComplect+"_"+save,p6)>0) { t6=Time[ObjectGetShiftByValue("Mediana"+"_"+ExtDepth+"_"+ExtComplect+"_"+save,p6)]+ExtMovePoint*Period()*60; } else t6=Time[0]-ObjectGetShiftByValue("Mediana"+"_"+ExtDepth+"_"+ExtComplect+"_"+save,p6)*Period()*60+ExtMovePoint*Period()*60; } if((p1p4) || (p1>p2 && p1=0) { t6=Time[ObjectGetShiftByValue("Mediana"+"_"+ExtDepth+"_"+ExtComplect+"_"+save,p6)]+ExtMovePoint*Period()*60; } else t6=Time[0]-ObjectGetShiftByValue("Mediana"+"_"+ExtDepth+"_"+ExtComplect+"_"+save,p6)*Period()*60+ExtMovePoint*Period()*60; } if(2*ObjectGetShiftByValue("Mediana"+"_"+ExtDepth+"_"+ExtComplect+"_"+save,p6)-PP[ExtPoint-3]-2*ExtMovePoint>=0) { t7=Time[2*ObjectGetShiftByValue("Mediana"+"_"+ExtDepth+"_"+ExtComplect+"_"+save,p6)-PP[ExtPoint-3]-2*ExtMovePoint]; } else t7=t6+(PP[ExtPoint-3]-ObjectGetShiftByValue("Mediana"+"_"+ExtDepth+"_"+ExtComplect+"_"+save,p6))*Period()*60+ExtMovePoint*Period()*60; /* 觐痧尻鲨? 鲥睇 p6 */ p6=ObjectGetValueByShift("Mediana"+"_"+ExtDepth+"_"+ExtComplect+"_"+save,ObjectGetShiftByValue("Mediana"+"_"+ExtDepth+"_"+ExtComplect+"_"+save,p6)); p7=2*p6-p3; //Print("t6=",TimeToStr(t6,TIME_DATE),"; p6=",p6,"; NbarMediana=",ObjectGetShiftByValue("Mediana"+"_"+ExtDepth+"_"+ExtComplect+"_"+save,p6)); //Print("t3=",TimeToStr(t3,TIME_DATE),"; p3=",p3,"; t7=",TimeToStr(t7,TIME_DATE),"; p7=",p7); if(p1==p4) { Alert("Fan to construct it is impossible."); p3=0;p6=0;p7=0;t3=0;t6=0;t7=0; } if(ExtScale==0) { AutoScale=MathAbs((p7-p3)*MathPow(10,Digits)/(2*(PP[ExtPoint-3]-ObjectGetShiftByValue("Mediana"+"_"+ExtDepth+"_"+ExtComplect+"_"+save,p6)))); }else AutoScale=ExtScale; CreateObject(p3,p6,p7,t3,t6,t7,save,AutoScale); } //---- //---- return(0); } //+------------------------------------------------------------------+ /*------------------------------------------------------------------+ | ZigZag_Talex, 棂弪 蝾麝? 镥疱腩爨 磬 沭圄桕?. 暑腓麇耱忸 蝾麇? | | 玎溧弪?? 忭屮龛? 镟疣戾蝠铎 ExtPoint. | +------------------------------------------------------------------*/ void ZZTalex(int n) { /*镥疱戾眄 */ int i,j,k,zzbarlow,zzbarhigh,curbar,curbar1,curbar2,EP,Mbar; double curpr,Mprice; bool flag,fd; static int endbar; static double endpr; /*磬鬣腩*/ for(i=0;i<=Bars-1;i++) {zz=0.0;} EP=ExtPoint; zzbarlow=iLowest(NULL,0,MODE_LOW,n,0); zzbarhigh=iHighest(NULL,0,MODE_HIGH,n,0); if(zzbarlowzzbarhigh) {curbar=zzbarhigh; curpr=High[zzbarhigh];} if(zzbarlow==zzbarhigh){curbar=zzbarlow;curpr=funk1(zzbarlow, n);} ArrayResize(Mbar,ExtPoint); ArrayResize(Mprice,ExtPoint); j=0; endpr=curpr; endbar=curbar; Mbar[j]=curbar; Mprice[j]=curpr; EP--; if(curpr==Low[curbar]) flag=true; else flag=false; i=curbar+1; while(EP>0) { if(flag) { while(i<=Bars-1) { curbar1=iHighest(NULL,0,MODE_HIGH,n,i); curbar2=iHighest(NULL,0,MODE_HIGH,n,curbar1); if(curbar1==curbar2){curbar=curbar1;curpr=High[curbar];flag=false;i=curbar+1;j++;break;} else i=curbar2; } Mbar[j]=curbar; Mprice[j]=curpr; EP--; } if(EP==0) break; if(!flag) { while(i<=Bars-1) { curbar1=iLowest(NULL,0,MODE_LOW,n,i); curbar2=iLowest(NULL,0,MODE_LOW,n,curbar1); if(curbar1==curbar2){curbar=curbar1;curpr=Low[curbar];flag=true;i=curbar+1;j++;break;} else i=curbar2; } Mbar[j]=curbar; Mprice[j]=curpr; EP--; } } /* 桉镳噔脲龛? 忮瘌桧 */ if(Mprice[0]==Low[Mbar[0]])fd=true; else fd=false; for(k=0;k<=ExtPoint-1;k++) { if(k==0) { if(fd==true) { Mbar[k]=iLowest(NULL,0,MODE_LOW,Mbar[k+1]-Mbar[k],Mbar[k]);Mprice[k]=Low[Mbar[k]];endbar=ExtDepth; } if(fd==false) { Mbar[k]=iHighest(NULL,0,MODE_HIGH,Mbar[k+1]-Mbar[k],Mbar[k]);Mprice[k]=High[Mbar[k]];endbar=ExtDepth; } } if(kGolden_section_v21.2.jpg
TK29帖子1楼右侧xm竖版广告90-240
个性签名

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

广告
TK30+TK31帖子一樓廣告
TK30+TK31帖子一樓廣告
ljwlxrll
注册时间2015-02-10
发表于:2015-02-10 13:45只看该作者
2楼
到底好用不好用
个性签名

韬客社区www.talkfx.co

WLLYH
注册时间2016-09-17
发表于:2016-09-19 18:19只看该作者
3楼
谢谢分享
jjrentk
注册时间2016-05-14
发表于:2016-09-19 18:23只看该作者
4楼
感觉进入外太空了
qweqweqwe
注册时间2016-09-18
lzcygw
注册时间2016-09-04
发表于:2016-10-02 12:04只看该作者
6楼
好奇怪的指标
Pzxzx
注册时间2017-08-06

本站免责声明:

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

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

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

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

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

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