Maurizio-Ciullo

Indicatore High + Atr = Short Low - Atr = Long Stop Loss

Sep 30th, 2021 (edited)
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ATR - High/Low Study v1.0
  2. // (R) Claudio Tesoriero
  3. //
  4. // This Pine script show the ATR + the H(igh) value and the L(ow) value - ATR for each candle
  5. // Add the study to the graph and then click on the gear to edit the default values
  6. //
  7. // Happy trading!
  8.  
  9.  
  10. study("ATR - High/Low", overlay=true)
  11. atr_period = input(title="ATR Range", type=integer, defval=7)
  12.  
  13. t = tickerid(syminfo.prefix, ticker)
  14.  
  15. realH = security(t, period, high)
  16. valueH = realH + atr(atr_period)
  17.  
  18. realL = security(t, period, low)
  19. valueL = realL - atr(atr_period)
  20.  
  21. plot(valueH, title="ATR + High", color=green, linewidth=2, style=cross)
  22. plot(valueL, title="Low - ATR", color=red,linewidth=2, style=cross)
  23.  
Add Comment
Please, Sign In to add comment