Download MetaTrader 5

iBands function for a specific Bar

To add comments, please log in or register
You can test an application before buying it. Find out how to do that!
sd2000sd
212
sd2000sd 2014.08.25 15:33 

I want to get the result of the iBands() indicator function on the bar which I like, for example the third bar from the recent bars on the chart that my EA is attached.

How can I get that?

How can I accomplish that?

the following: just returns the latest number of the iBands for the latest price on the chart:

double myVar;

   myVar=(iBands(NULL,0, 20, 2, 0, PRICE_CLOSE, MODE_MAIN, 0));


someone please help me!



double  iBands(
   string       symbol,           // symbol
   int          timeframe,        // timeframe
   int          period,           // averaging period
   double       deviation,        // standard deviations
   int          bands_shift,      // bands shift
   int          applied_price,    // applied price
   int          mode,             // line index
   int          shift             // shift
   );

Alain Verleyen
Moderator
30752
Alain Verleyen 2014.08.25 17:13  
  myVar=iBands(NULL,0, 20, 2, 0, PRICE_CLOSE, MODE_MAIN, 3);
To add comments, please log in or register