Green Red Accurate Entry Exit Circles


Green Red Accurate Entry Exit Circles
Green Red Accurate Entry Exit Circles


//www.aflcode.com
_SECTION_BEGIN("HULL MA");

///////////////////////////////////  HULL MA /////////////////////////////////////////////////////////////
Period = Param("Period",15,1,100,1);
Period1 = Param("Period1",40,1,100,1);
Hull = WMA( 2*WMA(C,int(Period/2))- WMA(C,Period),int(sqrt(Period)));
Hull1= WMA( 2*WMA(C,int(Period1/2))- WMA(C,Period1),int(sqrt(Period1)));
//Plot(C,"close",6,128);
//Plot( C, "Close", ParamColor("Color", colorPink ), styleNoTitle | styleCandle );
for( i = 1 ; i < BarCount-2; i++ ) 
{
if (hull[i] <hull[i-1] && hull[i] <hull[i+1]) Lpml[i]=1; 
else
Lpml[i] =0;

if (hull[i] >hull[i-1] && hull[i] >hull[i+1]) Lpmh[i]=1;
else
Lpmh[i] =0;
}

GR =ExRem(LpmH,Lpmh);
RD =ExRem(Lpml,Lpml);

PlotShapes(IIf(GR!=0,shapeHollowCircle,shapeNone),colorRed,0,hull,0);
PlotShapes(IIf(RD!=0,shapeHollowCircle,shapeNone),colorBrightGreen,0,hull,0);
Plot(Hull,"Hull "+Period+" days",2,1);
Plot(Hull1,"Hull1 "+Period1+" days",3,1);
///////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////

HPLS=HULL-HULL1;
HMIN=HULL1-HULL;
SellHULL=Cross(HULL1,HULL) AND HHV(HPLS,10)>.02*HULL;
BuyHULL=Cross(HULL,HULL1) AND HHV(HMIN,10)>.02*HULL;



Filter=BuyHULL OR SellHULL;             ;



AddColumn(IIf(BuyHULL,1,IIf(SellHULL,-1,0)) ,"HL-2",1,colorWhite,IIf(BuyHULL,colorGreen,IIf(SellHULL,colorRed,colorWhite)));


_SECTION_END();

_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | styleHidden | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();

Previous
Next Post »