single candle diverson for Amibroker (AFL)
antic1989 almost 12 years ago Amibroker (AFL)
hi its my 1st afl..
based on rsi and nd candles high low diversons……
two types of trade signals…double arrows are trendwise signals…nd single arrow is against the trend…
best use in daily timeframe…
you need some more basic analysis before going in trade…
working more on it….
Indicator / Formula
Copy & Paste Friendly
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("Price");
c1 = RSI(14) ;
C2 =
Short1 = C1 < Ref(C1,-1) AND H > Ref(H,-1) ;
Buy1 = C1 > Ref(C1,-1) AND L < Ref(L,-1) ;
PlotShapes(short1*shapeDownArrow,colorRed,0,H,-12);
PlotShapes(buy1*shapeUpArrow,colorBlue,0,L,-12);
Plot(EMA(C,20),"",IIf(EMA(C,20)>Ref(EMA(C,20),-1),colorLime,colorRed),styleLine);
Plot(BBandTop(C,20,2),"",colorWhite,styleLine);
Plot(BBandBot(C,20,2),"",colorWhite,styleLine);
Short2 = Short1 AND (EMA(C,20)<Ref(EMA(C,20),-1) OR EMA(C,50)<Ref(EMA(C,50),-1) OR MA(C,50)<Ref(MA(C,50),-1));
Buy2 = Buy1 AND (EMA(C,20)>Ref(EMA(C,20),-1) OR EMA(C,50)>Ref(EMA(C,50),-1) OR MA(C,50)>Ref(MA(C,50),-1)) ;
PlotShapes(short2*shapeDownArrow,colorYellow,0,H,-22);
PlotShapes(buy2*shapeUpArrow,colorRed,0,L,-22);
Filter = Buy1 == 1 OR Short1 == 1 OR Buy2 == 1 OR Short2 == 1;
AddColumn(Buy1,"Buy1",1,colorWhite,IIf(Buy1==0,colorWhite,colorLime)) ;
AddColumn(Short1,"Short1",1,colorWhite,IIf(Short1==0,colorWhite,colorRed)) ;
AddColumn(Buy2,"Buy2",1,colorWhite,IIf(Buy2==0,colorWhite,colorLime)) ;
AddColumn(Short2,"Short2",1,colorWhite,IIf(Short2==0,colorWhite,colorRed)) ;
_SECTION_END();0 comments
Leave Comment
Please login here to leave a comment.