Could you please create an indicator for the following condition :
Custom Range Breakout
Selects the no. of bars given as input..
Calculates high and low(range) of the selected no. of bars and plots it for the selected period..
Here is the code in Amibroker:
Code: Select all
_SECTION_BEGIN(" CRB ");
nd=Hour() != Ref(Hour(), -1);
x = 5;
crbh = ValueWhen(nd,Ref(HHV(H,x),-1));
crbl = ValueWhen(nd,Ref(LLV(L,x),-1));
Plot(crbh,"",colorBlack,stylenoreScale|styleNoLabel);
Plot(crbL,"",colorBlack,stylenoreScale|styleNoLabel);
PlotOHLC(crbl,crbh,crbl,crbl,"",ParamColor("CRB col",colorPaleBlue),stylenoreScale|styleNoLabel|styleCloud,0,0,0,-6);
_SECTION_END();