Stanislav Ivanov:
Hi,
Did you check whether the symbol string input was parsed correctly ?
Hello, good day, thanks for your reply..
this are the inputs.. separated using this
comma_sep = StringGetCharacter(",",0); string result[]; NumOfSymbols = StringSplit(Symbols, comma_sep, result);
it reads both symbol but only place trades on first symbol
i could not find whats wrong with my code
ahh..
this is strange
adding this into my code.. fixed it
int SignalBarShift = 0; ENUM_ORDER_TYPE SignalType=0; int i = 1, bars = iBars(symbol, PERIOD_CURRENT); while (i < bars) { if (team(SymbolNum,ReboundD, i)!=EMPTY_VALUE) {SignalBarShift = i; break;} if (team(SymbolNum,ReboundU, i)!=EMPTY_VALUE) {SignalBarShift = i; break;} i++; } if (SignalBarShift == 0) continue; if (SignalBarShift == 1 ) { }
void OnTick() { for (int SymbolNum = 0; SymbolNum < NumOfSymbols; SymbolNum++) { string symbol = SymbolArray[SymbolNum]; int SignalBarShift = 0; ENUM_ORDER_TYPE SignalType=0; int i = 1, bars = iBars(symbol, PERIOD_CURRENT); while (i < bars) { if (team(SymbolNum,ReboundD, i)!=EMPTY_VALUE) {SignalBarShift = i; break;} if (team(SymbolNum,ReboundU, i)!=EMPTY_VALUE) {SignalBarShift = i; break;} i++; } if (SignalBarShift == 0) continue; if (SignalBarShift == 1 ) { if(CopyBuffer(team_handle[SymbolNum], 2, 0, 6, buy) <= 0) return; ArraySetAsSeries(buy, true); if(CopyBuffer(team_handle[SymbolNum], 3, 0, 6, sell) <= 0) return; ArraySetAsSeries(sell, true); if(Use_Trend_Filter) { if(CopyBuffer(trend_handle[SymbolNum], uptrend_Buffer, 0, 200, uptrend) <= 0) return; ArraySetAsSeries(uptrend, true); if(CopyBuffer(trend_handle[SymbolNum], downtrend_Buffer, 0, 200, downtrend) <= 0) return; ArraySetAsSeries(downtrend, true); } ulong ticket=0; if(buysignal()) { ticket = sendmeorder(symbol,ORDER_TYPE_BUY, price,stoplossB(),Btp1(),lot(ORDER_TYPE_BUY), cmt); } if(sellsignal()) { ticket = sendmeorder(symbol,ORDER_TYPE_SELL, price,stoplossS(),Stp1(),lot(ORDER_TYPE_SELL), cmt); } } } }
can someone explain why? undo its fixed and working perfectly. but i want to understand why the code worked!! i need to unscrew this from my brain

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
Hello, good day to you all..
am trying to make the code place trades on all selected pairs
eg.
buy signal from XAUUSD place XAUUSD buy,
buy signal from GBPUSD place GBPUSD buy,
etc..
the code.. its reading signal from selected symbol, but will place trades on first symbol
eg.
the EA will reads all buys and sells from other symbols, but will place trade only on the first Symbol
tried
places trades on GBPUSD from GBPUSD signals.. and other selected symbol signals
send me order function