Download MetaTrader 5
To add comments, please log in or register
Sell products right in MetaTrader. Millions of traders are waiting for this!
dolemi
145
dolemi 2015.05.26 19:34 

Hi,

    How can I get Bars from different currency pairs?

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


   Thanks in advance!

Gordon Gekko
644
Gordon Gekko 2015.05.26 20: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...

dolemi
145
dolemi 2015.05.26 21: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);

  }


Gordon Gekko
644
Gordon Gekko 2015.05.26 21: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;

dolemi
145
dolemi 2015.05.27 06:15  
ggekko:

For example:

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

Thanks!

whroeder1
13597
dolemi
145
dolemi 2015.05.28 23:49  
/
To add comments, please log in or register