See the MarketInfo instruction to get information from another pair : https://docs.mql4.com/common/MarketInfo
Jacques366:
thanks but my question was about how to make a chart with a ratio between two pairs and not to get the last or bid...
Use this:
https://docs.mql4.com/series
You'll need to choose do you want Open or Close value.
double iOpen( string symbol, int timeframe, int shift)
so,
string ratio = iOpen("EURUSD","M1",1)/iOpen("GBPUSD","M1",1);
//1 i "shift value", you need to use FOR statement to take all historical data...
I think that should do it...
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I would like to know you if there's a way to get on the same chart a ratio between the pairs ( for example eurusd / gbpusd ) ?
Thanks