wemersonrv

Exemplo MQL4

Apr 22nd, 2015
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.50 KB | None | 0 0
  1. //+------------------------------------------------------------------+
  2. //|                                              PastebinExemplo.mq4 |
  3. //|                            Copyright 2015, Wemerson C. Guimarães |
  4. //+------------------------------------------------------------------+
  5. #property copyright "Copyright 2015, Wemerson C. Guimarães"
  6. #property version   "1.00"
  7. #property strict
  8. #property indicator_separate_window
  9. //+------------------------------------------------------------------+
  10. //| Custom indicator initialization function                         |
  11. //+------------------------------------------------------------------+
  12. int OnInit()
  13.   {
  14. //--- indicator buffers mapping
  15.    
  16. //---
  17.    return(INIT_SUCCEEDED);
  18.   }
  19. //+------------------------------------------------------------------+
  20. //| Custom indicator iteration function                              |
  21. //+------------------------------------------------------------------+
  22. int OnCalculate(const int rates_total,
  23.                 const int prev_calculated,
  24.                 const datetime &time[],
  25.                 const double &open[],
  26.                 const double &high[],
  27.                 const double &low[],
  28.                 const double &close[],
  29.                 const long &tick_volume[],
  30.                 const long &volume[],
  31.                 const int &spread[])
  32.   {
  33. //---
  34.    
  35. //--- return value of prev_calculated for next call
  36.    return(rates_total);
  37.   }
  38. //+------------------------------------------------------------------+
Advertisement
Add Comment
Please, Sign In to add comment