setting a bool array, error } comma or semicolon expected

 

seems pretty simple but for some reason its not letting me

here is the externs i have defined

extern bool USDCHF = TRUE; //USDCHF
extern bool GBPUSD = TRUE; //GBPUSD
extern bool EURUSD = TRUE; //EURUSD
extern bool USDJPY = TRUE; //USDJPY
extern bool USDCAD = TRUE; //USDCAD
extern bool NZDUSD = TRUE; //NZDUSD
extern bool AUDUSD = TRUE; //AUDUSD
extern bool AUDNZD = TRUE; //AUDNZD
extern bool AUDCAD = TRUE; //AUDCAD
extern bool AUDJPY = TRUE; //AUDJPY
extern bool CHFJPY = TRUE; //CHFJPY
extern bool EURGBP = TRUE; //EURGBP
extern bool EURAUD = TRUE; //EURAUD
extern bool EURCHF = TRUE; //EURCHF
extern bool EURJPY = TRUE; //EURJPY
extern bool EURCAD = TRUE; //EURCAD
extern bool GBPCHF = TRUE; //GBPCHF
extern bool GBPJPY = TRUE; //GBPJPY
extern bool NZDJPY = TRUE; //NZDJPY
extern bool AUDCHF = TRUE; //AUDCHF
extern bool EURNZD = TRUE; //EURNZD
extern bool GBPAUD = TRUE; //GBPAUD
extern bool GBPCAD = TRUE; //GBPCAD
extern bool XAUUSD = TRUE; //XAUUSD
extern bool XAGUSD = TRUE; //XAGUSD


below is the array i create inside of the start()


bool MarketsVisible[25] = { USDCHF, GBPUSD, EURUSD, USDJPY, USDCAD, NZDUSD, AUDUSD, AUDNZD, AUDCAD, AUDJPY, CHFJPY, EURGBP, EURAUD, EURCHF, EURJPY, EURCAD, GBPCHF, GBPJPY, NZDJPY, AUDCHF, EURNZD, GBPAUD, GBPCAD, XAUUSD, XAGUSD };



keeps coming back with comma or semicolon expected, not sure where im going wrong at



also is there a way to calculate pips for just opened trades, not trades that are already in the history?

 
seems mql does not like variables or constants by initialisation. i assume you have to go longer way with MarketsVisible[0]=USDCHF; etc
 
fx1.net:
seems mql does not like variables or constants by initialisation. i assume you have to go longer way with MarketsVisible[0]=USDCHF; etc

Exactly, they must be constants in the {}. Initialize the array in Init(){}

 
WHRoeder:

Exactly, they must be constants in the {}. Initialize the array in Init(){}

thanks worked fine once i made that change

Reason: