Built-in symbol settings

 

Hi there, I'm having issue when trying to trade symbols with different settings built into a multicurrency advisor. This is the way I've coded the "solution":

   for(int s=0;s<SymbolsTotal(true);s++){
      string SName=SymbolName(s,true);
      if(ManageAll==false){SName=_Symbol;}
      //+---------------------------------------- Symbol settings ---!
      if(SName=="NZDCHF"){RiskFactor=2.0;}
      if(SName=="EURCHF"){RiskFactor=2.0;}
      if(SName=="AUDCAD"){RiskFactor=2.0;}
      if(SName=="EURCAD"){RiskFactor=2.0;Martingale=true;}
      if(SName=="USDCHF"){RiskFactor=2.0;Martingale=true;}
      if(SName=="CHFJPY"){RiskFactor=2.0;SL_Divider=2.618;}
      if(SName=="GBPUSD"){RiskFactor=2.0;Martingale=true;SL_Divider=2.618;}
      if(SName=="EURGBP"){RiskFactor=2.0;Martingale=true;SL_Divider=2.618;}
      if(SName=="EURUSD"){RiskFactor=2.0;StartHour=0;StopHour=24;Martingale=true;}

What's happening is that it's taking all this modified settings and applying them to all currency pairs.

Any help would be welcome cause this strategy would perform much better based on every tick tests, thank you in advance.

 
David Diez:

Hi there, I'm having issue when trying to trade symbols with different settings built into a multicurrency advisor. This is the way I've coded the "solution":

What's happening is that it's taking all this modified settings and applying them to all currency pairs.

Any help would be welcome cause this strategy would perform much better based on every tick tests, thank you in advance.

You missing a bracket "}" at the end of the code.

 
Nikolaos Pantzos:

You missing a bracket "}" at the end of the code.

That's not the mistake, as I said the advisor is taking all those non-default settings and applying them to all symbols.

 
Hi there, are there EA's that just work in mobile fone if you dont have a Pc ?
 
Nompi Suthu:
Hi there, are there EA's that just work in mobile fone if you dont have a Pc ?

There's no EAs for mobile, but you can make tones of money through mobile.

 
David Diez:

That's not the mistake, as I said the advisor is taking all those non-default settings and applying them to all symbols.

Need to work with arrays for multicurrencies system.

Like this...

      if(SName=="NZDCHF"){RiskFactor[0]=2.0;}
      if(SName=="EURCHF"){RiskFactor[1]=2.0;}
      if(SName=="AUDCAD"){RiskFactor[2]=2.0;}
      if(SName=="EURCAD"){RiskFactor[3]=2.0;Martingale[3]=true;}
      if(SName=="USDCHF"){RiskFactor[4]=2.0;Martingale[4]=true;}
      if(SName=="CHFJPY"){RiskFactor[5]=2.0;SL_Divider[5]=2.618;}
      if(SName=="GBPUSD"){RiskFactor[6]=2.0;Martingale[6]=true;SL_Divider[6]=2.618;}
      if(SName=="EURGBP"){RiskFactor[7]=2.0;Martingale[7]=true;SL_Divider[7]=2.618;}
      if(SName=="EURUSD"){RiskFactor[8]=2.0;StartHour[8]=0;StopHour[8]=24;Martingale[8]=true;}
or





      if(SName=="NZDCHF"){RiskFactor[s]=2.0;}
      if(SName=="EURCHF"){RiskFactor[s]=2.0;}
      if(SName=="AUDCAD"){RiskFactor[s]=2.0;}
      if(SName=="EURCAD"){RiskFactor[s]=2.0;Martingale[s]=true;}
      if(SName=="USDCHF"){RiskFactor[s]=2.0;Martingale[s]=true;}
      if(SName=="CHFJPY"){RiskFactor[s]=2.0;SL_Divider[s]=2.618;}
      if(SName=="GBPUSD"){RiskFactor[s]=2.0;Martingale[s]=true;SL_Divider[s]=2.618;}
      if(SName=="EURGBP"){RiskFactor[s]=2.0;Martingale[s]=true;SL_Divider[s]=2.618;}
      if(SName=="EURUSD"){RiskFactor[s]=2.0;StartHour[s]=0;StopHour[s]=24;Martingale[s]=true;}

if expert run code for symbol [0] =  (NZDCHF), then use all prosets variables array value '[0]'.

Reason: