Download MetaTrader 5
To add comments, please log in or register
Ask your broker to open the official channel. Thousands of traders will read the news!
enjoysmath
64
enjoysmath 2015.07.21 23:10 

A tick seems to occur every second or several times a second in MetaTrader 4.  And every tick OnCalculate() is called.  However, OnCalculate's parameters such as high[i] are such that each index in high represents one minute of data minimally (by setting time frame to 1M).

So what is the deal?  How can you get the highest res tick information?  What am I not understanding?

Keith Watford
Moderator
9465
Keith Watford 2015.07.22 00:01  
What does "highest res tick information" mean?
enjoysmath
64
enjoysmath 2015.07.22 00:06  
GumRai:
What does "highest res tick information" mean?
If the information changes every second, then I would expect to have a price or currency pair ratio every second, is that possible with MT4, why / why not?
whroeder1
14212
whroeder1 2015.07.22 12:08  
enjoysmath:

A tick seems to occur every second or several times a second in MetaTrader 4.  And every tick OnCalculate() is called.  However, OnCalculate's parameters such as high[i] are such that each index in high represents one minute of data minimally (by setting time frame to 1M).

  1. There is the parameters high[] and the The predefined Variables - MQL4 Documentation High[]. Don't get them confused. high[] can be ordered either direction; High[0] is the current bar always.
    Ignore the parameters and just use
    int counted = IndicatorCounted();
    int lookback = ... // iMA(period) has look back of period.
                       // buffer[i+2] has look back of 2
                       // use maximum of all.
    for(int iBar = Bars - MathMax(lookback, counted); iBar >= 0; --iBar) ...
    
    the buffers and The predefined Variables - MQL4 Documentation
  2. It is called every tick because Close[0] and possibly the High or Low have changed.
/
To add comments, please log in or register