Hi there, I've been woring around this idea for some time and I still haven't found the way to make it work properly.

The idea a is quite simple, on a multicurrency advisor, let's say 28 fx pairs and 8 traded currencies filter (do not trade) those pairs with an already traded currency.

For this I tried by using a 28 pair symbol loop, an 8 pair currency loop and the stringfind to check around the currencies inside each pair, but sadly still haven't found a clever way to make it work.

Thus I've finally decided to post this coding issue in the forum for if anybody could share an example.

I think it's not necessary to post any failed attempt because unuseful.

Alain Verleyen #:

This could be one from several:

```      for(int q=0;q<TotalCurrencies;q++){
string QName=Currencies[q];//Currencies.
return;
}
}
...```

The problem here is that it always find a traded one or viceversa, so it doesn't make difference if I make stringfind <0 or >=0.

Well, although I still got no relevant results it seems to be yet solved (by myself).

Must say that getting no answers is quite disgusting but I'll post my solution anyway for the community.

First we check into the symbols traded from a string function for traded currencies:

```string QTraded(){
ushort sep=StringGetCharacter(",",0);
StringSplit(CurrencyList,sep,Currencies);
int TotalCurrencies=ArraySize(Currencies);
for(int s=0;s<SymbolsTotal(true);s++){
string SName=SymbolName(s,true);
for(int p=0;p<PositionsTotal();p++){
ulong Ticket=PositionGetTicket(p);
for(int q=0;q<TotalCurrencies;q++){
string QName=Currencies[q];//Currencies.
if(PositionGetString(POSITION_SYMBOL)==SName){
}
}
}
}

Then, into the symbol loop of a multicurrency advisor we just need to exclude QTraded() from the symbols which are about to open a new position:

```if(StringFind(SName,QTraded(),0)<0){ // QTraded() isn't into the symbol to be traded, so the algorithm can continue checking its conditions to open a new position.