Trend Reversal AFL
Short Description
Download Trend Reversal AFL...
Description
_SECTION_BEGIN(" _SECTION _BEGIN("f"); f"); //-------------------------------------------//--------------------------------------------------------------------------------------------------SetChartOptions(0,chartShowArrows|chartShowDates); _N(Title=StrFo _N(Title =StrFormat("O rmat("Open%g, pen%g,Hi%g,L Hi%g,Lo%g,Cl o%g,Close%g( ose%g(%.1f%%)" %.1f%%)",O,H, ,O,H,L,C,Se L,C,Se lectedValue(ROC(C,1)))); T=26; BHSda=((C-MA(C,T))/MA(C,T))*100;//funcfixed Graph0=BHSda; Graph0Style=2+4; Graph0BarColor=IIf(BHSda>0,5,4); GraphXSpace=5; SetChartOptions(0,chartShowArrows|chartShowDates); Plot(C,"Close",ParamColor("Color",colorBla Plot(C,"Close",Para mColor("Color",colorBlack),styleNoTitle|styl ck),styleNoTitle|styleCandle) eCandle) ; Plot(O,"Open",ParamColor("Color",colorBlac Plot(O,"Open",Param Color("Color",colorBlack),styleNoDraw); k),styleNoDraw); Plot(H,"High",ParamColor("Color",colorBlac Plot(H,"High",Param Color("Color",colorBlack),styleNoDraw); k),styleNoDraw); Plot(L,"Low",ParamColor("Color",colorBlack Plot(L,"Low",ParamC olor("Color",colorBlack),styleNoDraw); ),styleNoDraw); //--------------------------------------------------------------------//------------------------------------------------------------------------------------Value1=60;//Param("BearRes",60,1,100,0.1); Value2=40;//Param("BullSup",40,1,100,0.1); BHSMPPer=13;//Param("Timeperiods",13,1,100); BHEXPerc=2*BHSMPPer-1; BSAU=EMA(Max(C-Ref(C,-1),0),BHEXPerc); BSAC=EMA(Max(Ref(C,-1)-C,0),BHEXPerc); x1=(BHSMPPer-1)*((BSAC*Value1)/(100-Value1)-BSAU); BSR1=IIf(x1>=0,C+x1,C+x1*(100-Value1)/Value1); x2=(BHSMPPer-1)*((BSAC*Value1)/(100-Value2)-BSAU); BSR2=IIf(x2>=0,C+x2,C+x2*(100-Value2)/Value2); Plot(BSR1,"",colorOrange,styleDashed); Plot(BSR2,"",colorPaleBlue,styleDashed); //-------------------------------------------//------------------------------------------------------------------------------------------------------------r1=12;//Param("Fastavg",12,2,200,1); r2=26;//Param("Slowavg",26,2,200,1); r3=9;//Param("Signalavg",9,2,200,1); Z=1;//Param("zig",1,0,10,0.1); Cond1=Cross(MACD(r1,r2),Signal(r1,r2,r3)); Cond3=Zig(C,z)>Ref(Zig(C,z),-4); Buy=Cond1ANDCond3; Cond4=Cross(Signal(r1,r2,r3),MACD(r1,r2)); Cond6=Zig(C,z)=90000ANDTimeNum()=090000ANDTimeNum()0); Num_Bars=36000/Interval(1); TimeFrameSet(inDaily); TOP_=Open; PDH_=Ref(High,-1); PDL_=Ref(Low,-1); PDO_=Ref(Open,-1); PDC_=Ref(Close,-1); PDM_=(PDH_+PDL_)/2; TimeFrameRestore(); isAll=True; isRth=TimeNum()>=085400ANDTimeNum()=085400ANDTimeNum()
View more...
Comments