- Do not trade multiple currencies, you can't use any predefined variables, can't use the tester, must poll (not OnTick,) and usually other problems.
- Code it to trade the chart pair only. Look at the others if you must.
- Then put it on other charts to trade the other pairs. Done.
string v_Sym[]; v_Sym[0] = "AUDUSD"; v_Sym[1] = "AUDCAD"; v_Sym[2] = "AUDCHF";
This won't work; the array has no size so you can't assign to it. Simplifystring v_Sym[] = { "AUDUSD", "AUDCAD", "AUDCHF" ...};
- Do not trade multiple currencies, you can't use any predefined variables, can't use the tester, must poll (not OnTick,) and usually other problems.
- Code it to trade the chart pair only. Look at the others if you must.
- Then put it on other charts to trade the other pairs. Done.
- Do not trade multiple currencies, you can't use any predefined variables, can't use the tester, must poll (not OnTick,) and usually other problems.
- Code it to trade the chart pair only. Look at the others if you must.
- Then put it on other charts to trade the other pairs. Done.
Hang on... number 1 is a bit disturbing. I don't care that I can't use the predefined variables because you can get the same information through functions. And I understand that I can act on only the incoming ticks from one pair. But that the Strategy Tester can't handle multiply currencies is annoying.
https://www.mql5.com/en/articles/1490
But this article says something a little different under the heading "Modelling Prices on Other Symbols":
Nevertheless, the tester in MetaTrader 4 allows receiving information about prices of other symbols, different from the tested one. But in this case the modelling is not carried, the data is extracted as it is. The zero bar is simplified to introducing on the beginning of the process the following: High[0]=Low[0]=Close[0]=Open[0], Volume[0]=1 which enables to know the price at the beginning of the bar, but no price at the end. To make sure, just test a simple Expert Advisor on EURUSD in the mode "Every tick".
So it does seem that you can receive information from other symbols, but that ticks are not modelled, and apparently you can't trade the other symbols.
- 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 Experts,
I have written an indicator/EA in which I use Symbol() to find the currency pair of the Chart that is using the EA.
If I want to test my EA for (say) 10 currency pairs, then I have drag and drop the EA to 10 different currency charts.
Instead can i use the below code to verify 10 pairs in single chart of EURUSD?
I tried this, but my EA is not working. Could anyone please help me on this?
Thanks in advance.
Thanks,
Prakash.R