AFL help for analysis

#1
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.
Conditions
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 .
 
#2
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.


_SECTION_BEGIN("TEST_ANALYSIS");

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 ) );
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() );


GfxSetBkMode(transparent=1);
GfxSelectPen( colorGreen, 2 );
GfxSetBkColor(colorBlack);
GfxSetTextColor( colorRed);
GfxSelectFont("Times New Roman", 14, 900, True );
GfxTextOut("TEST_ANALYSIS", 8 , 17 );
SetChartOptions(0,chartShowArrows|chartShowDates);

_SECTION_END();
 

Similar threads