Manish have you wrote the all. Please share
Here you go.
_SECTION_BEGIN("Box Afl");
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() );
box=(Ref(C,0)>=Ref(O,-3) AND Ref(C,0)<=Ref(C,-3) AND Ref(C,-1)>=Ref(O,-3) AND Ref(C,-1)<=Ref(C,-3) AND Ref(C,-2)>=Ref(O,-3) AND Ref(C,-2)<=Ref(C,-3)) OR (Ref(C,0)<=Ref(O,-3) AND Ref(C,0)>=Ref(C,-3) AND Ref(C,-1)<=Ref(O,-3) AND Ref(C,-1)>=Ref(C,-3) AND Ref(C,-2)<=Ref(O,-3) AND Ref(C,-2)>=Ref(C,-3));
e1=ValueWhen(box,Ref(C,-3));
e2=ValueWhen(box,Ref(O,-3));
e3=MA( C, 21 );
PlotOHLC(e1,e1,e2,e2,"",IIf(e1>e2,colorPaleGreen,colorLightOrange),styleCloud,0,0,0,-2);
Plot(e1,"",colorBlack,styleLine,0,0,0,0);
Plot(e2,"",colorBlack,styleLine,0,0,0,0);
Plot( e3, "",IIf(e3>Ref(e3,-1),colorDarkGreen,IIf(e3<Ref(e3,-1),colorRed,colorYellow)),styleThick );
_SECTION_END();