Open=High pine script for Trading view

Copy and paste below script in pine editor:

 

 

// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © sandeshk0101
//@version=5
indicator(“OH”, overlay = true)
[do,dh,dl] = request.security(syminfo.tickerid, “D”, [open,high,low], lookahead=barmerge.lookahead_on)
day_open= open
day_high= high
//plot(dh, title=”High”, color=color.red,    linewidth=2, trackprice=true)
//plot(do, title=”Open”, color=color.yellow, linewidth=2, trackprice=true)
//plot(dl, title=”Low”,  color=color.green,  linewidth=2, trackprice=true)
if day_open == day_high
    label.new(bar_index,high,”OpenHigh”, yloc = yloc.abovebar, color = color.white, style = label.style_arrowdown)

You might also like

Leave a Reply

Your email address will not be published. Required fields are marked *