If like me you are trading institutional levels on Forex and want them to always appear automatically around the price, here is a little indicator to do that, easily customizable.
Valid for all pairs and JPY pairs.
It draws a maximum of 4 lines around the price.
// Draw Forex Institutionnal levels
// Etops 13/08/2019
defparam drawonlastbaronly=true
price = close[0]
if price/10 <1 then
ref = round(close[0]*100)/100
step = 0.01
drawhline(ref) coloured(0,0,0)
if abs(price-(ref+step))<0.0200 then
drawhline(ref+step) coloured(0,0,0)
endif
if abs(price-(ref+2*step))<0.0200 then
drawhline(ref+2*step) coloured(0,0,0)
endif
if abs(price-(ref-step))<0.0200 then
drawhline(ref-step) coloured(0,0,0)
endif
if abs(price-(ref-2*step))<0.0200 then
drawhline(ref-2*step) coloured(0,0,0)
endif
else
//for JPY pairs
ref = round(close[0])
step = 1
drawhline(ref) coloured(0,0,0)
if abs(price-(ref+step))<2 then
drawhline(ref+step) coloured(0,0,0)
endif
if abs(price-(ref+2*step))<2 then
drawhline(ref+2*step) coloured(0,0,0)
endif
if abs(price-(ref-step))<2 then
drawhline(ref-step) coloured(0,0,0)
endif
if abs(price-(ref-2*step))<2 then
drawhline(ref-2*step) coloured(0,0,0)
endif
endif
return