In MQL5 ? If yes, could you please share how ?Yes, it is possible.
Trade.PositionOpen(_Symbol, ORDER_TYPE_BUY, Lots, Ask, SL, TP);
Trade.PositionOpen("AUDUSD", ORDER_TYPE_BUY, Lots, Ask, SL, TP);
Can i create a function called symbols1 in which i can create an infinite loop of all the market watch symbols and have it return a string ? Same with timeframes ? So with every tick the EA is watching all pairs and all timeframes for my setupTo open a trade in another currency pair you just substitute _Symbol with something else in the CTrade's PositionOpen method. E.g.:
becomes:MQL5:Trade.PositionOpen(_Symbol, ORDER_TYPE_BUY, Lots, Ask, SL, TP);
MQL5:Trade.PositionOpen("AUDUSD", ORDER_TYPE_BUY, Lots, Ask, SL, TP);
To analyze data from other currency pairs and timeframes, you just use iOpen(), iHigh(), iLow(), iClose() with whatever parameters (symbol/timeframe) you want.
Yes, you can loop through all symbols (either only those in Market Watch or ALL symbols present in your broker's server) and do whatever you want with them.Can i create a function called symbols1 in which i can create an infinite loop of all the market watch symbols and have it return a string ? Same with timeframes ? So with every tick the EA is watching all pairs and all timeframes for my setup
Could you please share how ? Or redirect me to an article i can learn from ?Yes, you can loop through all symbols (either only those in Market Watch or ALL symbols present in your broker's server) and do whatever you want with them.
Reading a help file on SymbolsTotal() function will guide you.Could you please share how ? Or redirect me to an article i can learn from ?
Thank youReading a help file on SymbolsTotal() function will guide you.
int symbol= SymbolsTotal(1); for(int sym=0;sym<symbol;sym++) ENUM_TIMEFRAMES period[10]={PERIOD_M1,PERIOD_M2,PERIOD_M3,PERIOD_M4,PERIOD_M5,PERIOD_M6,PERIOD_M10,PERIOD_M12,PERIOD_M15,PERIOD_M20}; for(int TF=0;TF<10;TF++)