Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- index = timeframe.period == "1" ? 1440 :
- timeframe.period == "3" ? 480 : timeframe.period == "5" ? 288 :
- timeframe.period == "15" ? 96 : timeframe.period == "30" ? 48 :
- timeframe.period == "45" ? 32 : timeframe.period == "60" ? 24 :
- timeframe.period == "120" ? 12 : timeframe.period == "180" ? 8 :
- timeframe.period == "240" ? 6 : timeframe.period == "D" ? 1 : 0
- var Func1_StartTime = timestamp("GMT+1",2020,1,21,0,0,0)
- var Func1_EndTime = Func1_StartTime + 86400000
- hugh = highest(high, index)
- high_ = high
- high_ := cross(time,Func1_EndTime) ? hugh : high_[1]
- luw = lowest(low, index)
- low_ = low
- low_ := cross(time,Func1_EndTime) ? luw : low_[1]
- timeluw = valuewhen(low==luw,time,0)
- timelow_ = time
- timelow_ := cross(time,Func1_EndTime) ? timeluw : timelow_[1]
- timehugh = valuewhen(high==hugh,time,0)
- timehigh_ = time
- timehigh_ := cross(time,Func1_EndTime) ? timehugh : timehigh_
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement