EA with multicurrency in real

 

Hello, could someone explain why this string works fine in demo but in real it returns always value " 0 "

MA1 = iMA("GBPUSD", PERIOD_M15, MA_Period1, MA_Shift1,MA_Method1, 0, 1); ("GBPUSD" is just for example)

I notice that this string works only if I use NULL in place of "GBPUSD".

I need to set a specific symbol (i.e. "EURUSD","USDJPY","GBPUSD","USDCHF","AUDUSD","USDCAD") because I use more than one currency at the same time

with a unique Expert Advisor.

 

Maybe in the real account "GBPUSD" has some extra letters

eg. "GBPUSDm"

 
lauracri:

Hello, could someone explain why this string works fine in demo but in real it returns always value " 0 "

MA1 = iMA("GBPUSD", PERIOD_M15, MA_Period1, MA_Shift1,MA_Method1, 0, 1); ("GBPUSD" is just for example)

I notice that this string works only if I use NULL in place of "GBPUSD".

I need to set a specific symbol (i.e. "EURUSD","USDJPY","GBPUSD","USDCHF","AUDUSD","USDCAD") because I use more than one currency at the same time

with a unique Expert Advisor.

I have fixed, because my account has all the symbols with the final letter " + " (EURUSD+, GBPUSD+, ....)
 
Ok ..yes i was going to tell you to include the suffix or prefix. but you figured it out.. way to go!