This EA is currently optimized for the GBPUSD 4hr chart but I would like it to work on multiple currencies, could some exam the logic and explain to me where I am going wrong. I am having a hard time understanding the MarketInfo function. I would like the final EA to only take one order at a time per currency.
Files:
ranger_1.mq4
4 kb
- Off-topic posts
- EA only opens one currency at a time
- How to test 1 EA, on Multiple Currencies at once?
...
line6: int digits = MarketInfo(Symbol(),MODE_DIGITS);
...
line14: ticket=OrderSend(Symbol(),OP_BUYSTOP,Lots, buy_price,3,0,buy_take_profit,"--",magic,TimeCurrent()+4*60*60,White);
...
line20: ticket = OrderSend(Symbol(),OP_SELLSTOP,Lots,sell_price,3,0,sell_take_profit,"--",magic,TimeCurrent()+4*60*60,Red);
...
This expert is not programmed to take multiple currencies.
The argument 'Symbol()' is telling the functions to use the symbol from the chart the expert is attached to: the current chart.
You must change this arguments if you want it to trade multiple currencies.
I suggest introducing channels into the code to keep track of multiple symbols. However, channels are not the only way.
open a chart to each currency; attach the EA to each chart.
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