Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version=5
- //Created By kbasar on 13-01-2023
- //Plots Current Days High, Low, And Or Previous Days. Both Days can be turned on and off with CheckBox
- //Daily Session To be used on IntraDay Charts
- indicator(title = "Daily High Low Breakout", shorttitle = "DHLB", overlay = true)
- st = input(true, title = "Show Todays OHLC?")
- sy = input(false, title = "Show Yesterdays OHLC?")
- //Daily
- ph = request.security(syminfo.tickerid, 'D', high)
- pdh = request.security(syminfo.tickerid, 'D', high[1])
- pl = request.security(syminfo.tickerid, 'D', low)
- pdl = request.security(syminfo.tickerid, 'D', low[1])
- //Daily Plots
- plot(st and ph ? ph : na, title = "Daily High", style = plot.style_circles, color = color.lime, linewidth = 3)
- plot(sy and pdh ? pdh : na, title = "Previous Daily High", style = plot.style_cross, color = color.lime, linewidth = 3)
- plot(st and pl ? pl : na, title = "Daily Low", style = plot.style_circles, color = color.red, linewidth = 3)
- plot(sy and pdl ? pdl : na, title = "Previous Daily Low", style = plot.style_cross, color = color.red, linewidth = 3)
- // local user defined function
- ema_plot(len) => ta.ema(close, len)
- // ema 10
- ema10 = ema_plot(10)
- plot(ema10, title = "EMA 10", color = color.blue, linewidth = 3)
- // ema 20
- ema20 = ema_plot(20)
- plot(ema20, title = "EMA 20", color = color.green, linewidth = 3)
Advertisement
Add Comment
Please, Sign In to add comment