AFL help for analysis

Hello all,
I was looking for a afl code for my analysis where I can identify below conditions.
hope experts coders out there will assist with this one.
Candle 1 (Yellow arrow) should be a big spike in vol and spread.
next consecutive candles (atleast 2 or 3) (HIGHs and LOWs) should be inside the first candle and Volumes for this concurrent candles should be lower than the first candle .
More to be specified as to high should be greater than close multiplied by what factor and low should be lesser than open multiplied by what factor.


Buy = Ref(H,1) < Ref(H,0) AND Ref(L,1) > Ref(L,0) AND Ref(H,2) < Ref(H,0) AND Ref(L,2) > Ref(L,0) AND Ref(V,0) > Ref(V,1) AND Ref(V,0) > Ref(V,2) AND O > L AND H > C;
Short = 0;
Sell = 0;
Cover = 0;

Filter = Buy OR Sell;

PlotShapes( Buy * shapeUpArrow + Sell * shapeDownArrow, IIf( Buy, colorGreen, colorRed ) );
_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() );

GfxSelectPen( colorGreen, 2 );
GfxSetTextColor( colorRed);
GfxSelectFont("Times New Roman", 14, 900, True );
GfxTextOut("TEST_ANALYSIS", 8 , 17 );


Similar threads

Broker Special Offers

Intraday Higher Leverage

Save up to 90% in brokerage and get higher leverage for intraday trades.

Are you a day trader?