I want to trigger a alert when the price is 33% lower than the Open price. this is daily open price and low price scrip
study(title=Open_and_Low
, shorttitle=O_L
, overlay=true)
st = input(true, title=OL
)
//Daily
tdo = security(tickerid, 'D', open)
pdo = security(tickerid, 'D', open[1])
pl = security(tickerid, 'D', low)
pdl = security(tickerid, 'D', low[1])
//Daily Plots
offs_daily = 0
plot(st and tdo ? tdo : na, title=Daily Open
, style=circles, linewidth=2, color=silver)
plot(st and pl ? pl : na, title=Daily Low
, style=circles, linewidth=2, color=red)