Get Bars from different currency pairs

Back to topics list To post a new topic, please log in or register
avatar
50
dolemi 2015.05.26 21:34
 

Hi,

    How can I get Bars from different currency pairs?

   eg. Bars for data iClose("OtherPairs", Period(),0)


   Thanks in advance!

avatar
1213
ggekko 2015.05.26 22:03 #
 
dolemi:

Hi,

    How can I get Bars from different currency pairs?

   eg. Bars for data iClose("OtherPairs", Period(),0)


   Thanks in advance!

double Val=iClose("USDCHF",PERIOD_H1,0);

or

double Val=iClose("GBPUSD",PERIOD_M15,3);

etc...

avatar
50
dolemi 2015.05.26 23:39 #
 
ggekko:

double Val=iClose("USDCHF",PERIOD_H1,0);

or

double Val=iClose("GBPUSD",PERIOD_M15,3);

etc...

Now, val= iClose("USDCHF",PERIOD_H1, Max_Index);

     What is the Max_Index I can have?

   for (int i=0; i<=Max_Index; i++)

  {

         Buffer[i] =iClose("USDCHF",PERIOD_H1,i);

  }


avatar
1213
ggekko 2015.05.26 23:52 #
 
dolemi:

Now, val= iClose("USDCHF",PERIOD_H1, Max_Index);

     What is the Max_Index I can have?

   for (int i=0; i<=Max_Index; i++)

  {

         Buffer[i] =iClose("USDCHF",PERIOD_H1,i);

  }


For example:

Max_Index=iBars("USDCHF",PERIOD_H1)-1;

avatar
50
dolemi 2015.05.27 08:15 #
 
ggekko:

For example:

Max_Index=iBars("USDCHF",PERIOD_H1)-1;

Thanks!


avatar
12983
avatar
50
dolemi 2015.05.29 01:49 #
 
Back to topics list  

To add comments, please log in or register