Need afl code for 5 bar high break buy or 5 bar low break sell

rvlv

Active Member
#1
HI friends
can somebody help me with this code please

buy on 5bars high breakout
sell on 5 bars low breakout downwards

Can somebody fix this for better visibility to ready spotting buy or sell signals!

HTML:
//5barhigh or low breakout
H5up =Ref(HHV(H,5),-1);
L5DN =Ref(LLV(L,5),-1);

Plot(C,"c",colorBlack,styleCandle);//i need thick bars


Plot(H5UP,"H5UP",colorBlue,styleLine);
Plot(L5DN,"L5DN",colorRed,styleLine);
//to add buy sell arrows
 
#4
HI friends
can somebody help me with this code please

buy on 5bars high breakout
sell on 5 bars low breakout downwards

Can somebody fix this for better visibility to ready spotting buy or sell signals!

HTML:
//5barhigh or low breakout
H5up =Ref(HHV(H,5),-1);
L5DN =Ref(LLV(L,5),-1);

Plot(C,"c",colorBlack,styleCandle);//i need thick bars


Plot(H5UP,"H5UP",colorBlue,styleLine);
Plot(L5DN,"L5DN",colorRed,styleLine);
//to add buy sell arrows






//5barhigh or low breakout
H5up =Ref(HHV(H,5),-1);
L5DN =Ref(LLV(L,5),-1);
tsl_col=ParamColor( "Color", colorCycle );
Plot(C,"c",colorBlack,styleCandle);//i need thick bars


Plot(H5UP,"H5UP",colorBlue,styleLine);
Plot(L5DN,"L5DN",colorRed,styleLine);
//to add buy sell arrows

Buy=Cover= Cross(C,H5up) ;
Sell=Short =Cross(L5DN,C);



Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
Short=ExRem(Short,Cover);
Cover=ExRem(Cover,Short);

shape=Buy*shapeUpArrow + Sell*shapeDownArrow;

PlotShapes(shape,IIf(Buy,tsl_col,tsl_col),0,IIf(Buy,Low,High));

dist = 1.9*ATR(10);
for( i = 0; i < BarCount; i++ )
{
if( Buy ) PlotText( " Buy " + C[ i ], i, C[ i ]-dist, colorDarkGreen);
if( Sell ) PlotText( " Sell " + C[ i ], i, C[ i ]+dist, colorDarkRed);
}
 

Similar threads

Intraday Higher Leverage

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

Name:Phone:
Email:City:
State:
Are you a day trader?