Advertisement
Spuzy

weird something

Jan 21st, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. index = timeframe.period == "1" ? 1440 :
  2. timeframe.period == "3" ? 480 : timeframe.period == "5" ? 288 :
  3. timeframe.period == "15" ? 96 : timeframe.period == "30" ? 48 :
  4. timeframe.period == "45" ? 32 : timeframe.period == "60" ? 24 :
  5. timeframe.period == "120" ? 12 : timeframe.period == "180" ? 8 :
  6. timeframe.period == "240" ? 6 : timeframe.period == "D" ? 1 : 0
  7.  
  8.  
  9. var Func1_StartTime = timestamp("GMT+1",2020,1,21,0,0,0)
  10. var Func1_EndTime = Func1_StartTime + 86400000
  11.  
  12. hugh = highest(high, index)
  13. high_ = high
  14. high_ := cross(time,Func1_EndTime) ? hugh : high_[1]
  15.  
  16.  
  17. luw = lowest(low, index)
  18. low_ = low
  19. low_ := cross(time,Func1_EndTime) ? luw : low_[1]
  20.  
  21. timeluw = valuewhen(low==luw,time,0)
  22. timelow_ = time
  23. timelow_ := cross(time,Func1_EndTime) ? timeluw : timelow_[1]
  24.  
  25. timehugh = valuewhen(high==hugh,time,0)
  26. timehigh_ = time
  27. timehigh_ := cross(time,Func1_EndTime) ? timehugh : timehigh_
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement