XavierAndreu

Crear ATR

Mar 26th, 2022
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. // https://youtu.be/syym3QqHqfI
  2.  
  3. void OnTick()
  4. {
  5.  
  6. Comment("Valor ATR: ",ATR(1,14));
  7.  
  8. }
  9.  
  10.  
  11. double ATR(int posicion,int periodos)
  12. {
  13. double ATRArray[];
  14. CopyBuffer(iATR(_Symbol,NULL,periodos),0,0,2,ATRArray);
  15. ArraySetAsSeries(ATRArray,true);
  16.  
  17. return(NormalizeDouble(ATRArray[posicion],_Digits));
  18. }
Advertisement
Add Comment
Please, Sign In to add comment