Hello,
I just had a first look at MQL4 and want to make sure I understood everything correctly.
1. Is it correct that the only way to run MQL4 programs is to attach them to charts?
2. I.e. is there no way to write a program that trades several currency pairs and is independent of any charts or uses several charts?
Please note that using several programs, each of which is attached to its own chart, not knowing anything about the activity of the other programs, would be something different.
3. What I am thinking about is a program that knows about the current state of (trades with) several currency pairs.
Jaroslav
1. Correct
2. You can do this with MQL4 but the EA/Script still has to be attached to a chart . . . that is how it gets ticks and runs it's next iteration/loop/cycle . . .
3. Can do this with an MQL4 EA . . no problem, it can see other pairs data and place trades on other pairs . . . it doesn't just have to trade the pair it is on. One small problem . . . you can't backtest this in the Strategy Tester, an EA in the ST can only place trades for the pair it is on.
1. Correct
2. You can do this with MQL4 but the EA/Script still has to be attached to a chart . . . that is how it gets ticks and runs it's next iteration/loop/cycle . . .
3. Can do this with an MQL4 EA . . no problem, it can see other pairs data and place trades on other pairs . . . it doesn't just have to trade the pair it is on. One small problem . . . you can't backtest this in the Strategy Tester, an EA in the ST can only place trades for the pair it is on.
Thank you very much for the fast and detailed answer.
If someone has already written code of this type, it would be great if he could share a little bit of it. (Just the relevant parts ...)
Thank you very much for the fast and detailed answer.
If someone has already written code of this type, it would be great if he could share a little bit of it. (Just the relevant parts ...)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I just had a first look at MQL4 and want to make sure I understood everything correctly.
Is it correct that the only way to run MQL4 programs is to attach them to charts? I.e. is there no way to write a program that trades several currency pairs and is independent of any charts or uses several charts?
Please note that using several programs, each of which is attached to its own chart, not knowing anything about the activity of the other programs, would be something different. What I am thinking about is a program that knows about the current state of (trades with) several currency pairs.
Jaroslav