Untitled
user_6299896
plain_text
a year ago
1.4 kB
11
Indexable
//@version=5 indicator("IGRT", overlay = true) show_to = input(true, title="Show Tokyo Reversal Time") show_lo = input(true, title="Show London Reversal Time") show_ny = input(true, title="Show New York Reversal Time") nu1 = input(180, title="Multiplier") nu2 = input(225, title="Subtraction") nu3 = input(360, title="Modulo") bac = (time-time[1])/2 tokyo = timestamp(year,month,dayofmonth,00,00) london = timestamp(year,month,dayofmonth,07,00) newyork = timestamp(year,month,dayofmonth,13,00) too = open[ta.barssince(time==tokyo)] loo = open[ta.barssince(time==london)] nyo = open[ta.barssince(time==newyork)] bgcolor(time==tokyo and show_to? color.new(color.red, 70) : na) bgcolor(time==london and show_lo? color.new(color.blue, 70) : na) bgcolor(time==newyork and show_ny? color.new(color.orange, 70) : na) dgrto = ((math.sqrt(too)*nu1)-nu2)%nu3 durto = 86400000*((dgrto/60)/24) dgrlo = ((math.sqrt(loo)*nu1)-nu2)%nu3 durlo = 86400000*((dgrlo/60)/24) dgrny = ((math.sqrt(nyo)*nu1)-nu2)%nu3 durny = 86400000*((dgrny/60)/24) bgcolor(((time+bac > tokyo+durto) and (time-bac < tokyo+durto)) and show_to? color.new(color.red, 30) : na) bgcolor(((time+bac > london+durlo) and (time-bac < london+durlo)) and show_lo? color.new(color.blue, 30) : na) bgcolor(((time+bac > newyork+durny) and (time-bac < newyork+durny)) and show_ny? color.new(color.orange, 30) : na)
Editor is loading...
Leave a Comment