Someone plz help me for below formula.
Formula is simple based on Inside bar as buy or sell candle. I want to buy only if high of inside bar broken and low of inside bar is not broken first.
So in short if low of Ib is broken first then no buy arrow will be shown when high is crossed later.
Green=C>O;Red=O>C;
IBb= H<Ref(H,-1) AND L>Ref(L,-1) and EMA(C,5)>EMA(C,15);
IBs= H<Ref(H,-1) AND L>Ref(L,-1) and EMA(C,5)<EMA(C,15);
barcolor = IIf( IBb, colorBlue,IIf(IBs, colorblack, IIf( Green, colorLime, colorRed)));
{ColorHighliter = barColor;
SetBarFillColor( ColorHighliter );}
BuySetupValue=ValueWhen(IBb,H,1);
SellsetupValue=ValueWhen(IBs,L,1);
Buy=Cross(C,BuySetupValue);
Sell=Cross(SellsetupValue,C);
Buy=ExRem(Buy,IBb OR IBs);
Sell=ExRem(Sell,IBb OR IBs);
PlotShapes( shapeUpArrow*Buy, colorGreen,0, H, 10) ;
PlotShapes( shapeDownArrow*Sell,colorRed,0, L, 10) ;
Formula is simple based on Inside bar as buy or sell candle. I want to buy only if high of inside bar broken and low of inside bar is not broken first.
So in short if low of Ib is broken first then no buy arrow will be shown when high is crossed later.
Green=C>O;Red=O>C;
IBb= H<Ref(H,-1) AND L>Ref(L,-1) and EMA(C,5)>EMA(C,15);
IBs= H<Ref(H,-1) AND L>Ref(L,-1) and EMA(C,5)<EMA(C,15);
barcolor = IIf( IBb, colorBlue,IIf(IBs, colorblack, IIf( Green, colorLime, colorRed)));
{ColorHighliter = barColor;
SetBarFillColor( ColorHighliter );}
BuySetupValue=ValueWhen(IBb,H,1);
SellsetupValue=ValueWhen(IBs,L,1);
Buy=Cross(C,BuySetupValue);
Sell=Cross(SellsetupValue,C);
Buy=ExRem(Buy,IBb OR IBs);
Sell=ExRem(Sell,IBb OR IBs);
PlotShapes( shapeUpArrow*Buy, colorGreen,0, H, 10) ;
PlotShapes( shapeDownArrow*Sell,colorRed,0, L, 10) ;