What is the best (standard) way to access the market data (High, Low, Open, Close, ...) of the other symbols?
Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 № 26
The function linked to, opens a hidden chart for the symbol/TF in question (if not already open,) thus updating history, and temporarily placing the symbol on Market Watch (if not already there,) so SymbolInfoDouble(symbol, SYMBOL_BID) or MarketInfo(symbol, MODE_BID) don't also return zero the first call.
On MT5: Unless the chart is that specific pair/TF, you must Synchronize the terminal Data from the Server.
Is it mystical?! It is! -
Withdraw - Technical Indicators - MQL5 programming forum
Timeseries
and Indicators Access / Data Access - Reference on
algorithmic/automated trading language for MetaTrader 5
Synchronize Server Data
with Terminal Data - Symbols - General - MQL5 programming forum
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi.
I am calculating some formula in Symbol1 which needs some data from Symbol2.
For instance, think that the indicator is placed in "USDJPY" pair and this indicator calculates the following:
How can I do this?
Could I use CopyOpen and CopyClose and get into open_array the history data of bar open prices for the "AUDJPY"-period pair in the specified quantity?
In other word, I want to be sure that the data of the other Symbol (in this case: "AUDJPY") are loaded completely and are available and accessible for calculations!
Please consider that I have done the above code and I can get the data for at least some last candles if I set max value of i (bar counter) to a number (for example, 20), but when I use the following code then the indicator shows wrong data on the screen:
Please note that I do not have any periodic calculations and period constants (like Moving Averages) and I want the indicator calculates the formula for all candles in the chart!
I also use the following code as OnInit:
Thanks for your help.