Maurizio-Ciullo

Indicatore Atr

Jan 26th, 2022 (edited)
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
  2. // Β© Maurizio-Ciullo
  3.  
  4. //@version=4
  5. study("Il mio Script", overlay=true)
  6.  
  7.  
  8. //Start Detecting Atr /////////////////////////////////////////
  9. //Modificare il simbolo syminfo.prefix, "ETHPERP" usando quello del grafico attuale
  10.  
  11. atr_period = input(title="ATR Range", type=input.integer, defval=7)
  12.  
  13. t = tickerid(syminfo.prefix, "ETHPERP")
  14.  
  15. realH = security(t, timeframe.period, high)
  16. valueH = realH + atr(atr_period)
  17.  
  18. realL = security(t, timeframe.period, low)
  19. valueL = realL - atr(atr_period)
  20.  
  21. plot(valueH, title="ATR + High", color=color.green, linewidth=2, style=plot.style_cross)
  22. plot(valueL, title="Low - ATR", color=color.red,linewidth=2, style=plot.style_cross)
  23.  
  24. //End Detecting Atr /////////////////////////////////////////
Add Comment
Please, Sign In to add comment