XavierAndreu

Media Spread

Mar 26th, 2022
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. // https://youtu.be/VuyDXGWUBdk
  2.  
  3. int contador=1;
  4. int sumadorSpread=0;
  5.  
  6. int OnCalculate(const int rates_total,
  7. const int prev_calculated,
  8. const int begin,
  9. const double &price[])
  10. {
  11.  
  12. Comment("Spread: ",SymbolInfoInteger(_Symbol,SYMBOL_SPREAD),
  13.  
  14. "\ncontador: ",contador,
  15. "\nSumadorspread: ",sumadorSpread,
  16.  
  17. "\nMedia Spread: ",
  18. (sumadorSpread=sumadorSpread +
  19. SymbolInfoInteger(_Symbol,SYMBOL_SPREAD))
  20. /contador
  21. );
  22.  
  23. contador++;
  24.  
  25. return(0);
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment