Entry OHL 5  Min 
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © maheshpatil
//////i copied the code and made it as per mine not my orignal code and rights reseved to admin@ TRADEMASTER EDUTECH
//@version=4
study(title="TRADEMASTER 2.35", shorttitle=" TRADEMASTER 2.35 ", overlay=true)
up5on = input(true, title="5 Minute Opening Range High")
down5on = input(true, title="5 Minute Opening Range Low")


is_newbar(res) => change(time(res)) != 0

adopt(r, s) => security(syminfo.tickerid, r, s)

//high_range = valuewhen(is_newbar('D'),high,0)
//low_range = valuewhen(is_newbar('D'),low,0)



high_rangeL = valuewhen(is_newbar('D'),high,0)  
low_rangeL = valuewhen(is_newbar('D'),low,0)
diff = (high_rangeL-low_rangeL)/2.35
up5 = plot(up5on ? adopt('5', high_rangeL): na, color = #009900, linewidth=1,style=plot.style_line)
down5 = plot(down5on ? adopt('5', low_rangeL): na, color = #ff0000, linewidth=1,style=plot.style_line)

diffup5 = plot(up5on ? adopt('5', (high_rangeL+diff)): na, color = #009900, linewidth=1,style=plot.style_line)
diffdown5 = plot(down5on ? adopt('5', (low_rangeL-diff)): na, color = #ff0000, linewidth=1,style=plot.style_line)
