Try this.
extern string symbol_1 = "EURUSD"; extern double lots_1 = 0.2; extern string symbol_2 = "GBPUSD"; extern double lots_2 = 0.4; extern string symbol_3 = "USDCHF"; extern double lots_3 = 0.1; //----------- string symbol[3] ; double lots[3] ; //----------- function start() { symbol[0] = symbol_1; lots[0] = lots_1; symbol[1] = symbol_2; lots[1] = lots_2; symbol[2] = symbol_3; lots[2] = lots_3; for(int i=0; i<3; i++) { OrderSend(symbol,OP_BUY, lots[i], MarketInfo(symbol[i],MODE_ASK), 2, NULL, NULL, "testing", magic, NULL, LimeGreen); } }

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'm looking to see if you can evaluate dynamically created variables in MT4. Here's an example. Suppose that I have 3 external variables that should create 3 different trades. I want to be able to dynamically create the variables I use to generate the orders.
Example: