Advertisement
mailinatorgj

lowest

Jan 7th, 2020
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. //@version=4
  2. study("My Script", overlay=true)
  3. sma1 = sma(close, 8)
  4. sma2 = sma(close, 13)
  5. plot(sma1, color=color.green)
  6. plot(sma2, color=color.red)
  7. cross_bull = crossover(sma1, sma2)
  8.  
  9. plotshape(cross_bull, style=shape.triangleup, location=location.bottom, color=color.green)
  10.  
  11. low0 = low[0] < low[1] and low[0] < low[2] and low[0] < low[3]
  12. low1 = low[1] < low[0] and low[1] < low[2] and low[1] < low[3]
  13. low2 = low[2] < low[0] and low[2] < low[1] and low[2] < low[3]
  14. low3 = low[3] < low[0] and low[3] < low[1] and low[3] < low[2]
  15.  
  16. lowestx = low0 ? 0 : low1 ? 1 : low2 ? 2 : low3 ? 3 : 0
  17. delay = 0
  18. delay := cross_bull ? lowestx : 0
  19.  
  20. bgcolor(cross_bull ? color.yellow : na, offset=-lowestx)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement