Array Copy Settings Display Pairs

 

Hello Everybody.

I created this function to load the pairs symbol in the graph, but it only carries the first and last pair, I need each pair have the string separated the way it is.


Look.

extern bool UsePairs=true; 
// String Symbols 

string DEURUSD[] = {"EURUSD"};
string DAUDCAD[] = {"AUDCAD"};
string DUSDJPY[] = {"USDJPY"};
string TradePairs[];


// On Init Load Pairs 
int OnInit()
  {   
 if (UsePairs == true)
      ArrayCopy(TradePairs,DEURUSD,
      ArrayCopy(TradePairs,DUSDJPY,
      ArrayCopy (TradePairs,DAUDCAD)));
}
}


 

This will load all three pairs

                ArrayCopy(TradePairs,DEURUSD,0);
                ArrayCopy(TradePairs,DUSDJPY,1);
                ArrayCopy (TradePairs,DAUDCAD,2);
But there is perhaps an easier way to do this:
string TradePairs[] = {"EURUSD", "AUDCAD", "USDJPY"};
 
Anthony Garot:

This will load all three pairs

But there is perhaps an easier way to do this:

Knowledge is a gift, it solved my problem.
Thank you very much.

Reason: