Find Open[0] for MT4 indicator

To add comments, please log in or register
dinh7loc
352
dinh7loc  

Hi

assume that we have this indicator setting:

iForce(NULL,0,period,method,price,0);

I want to know what is the amount of iForce at Open[0]

I searched about it, But I didn't find a result.

Thank you

Aleksei Beliakov
48815
Aleksei Beliakov  
 double val=iForce(NULL,0,period,method,PRICE_OPEN,0);
dinh7loc
352
dinh7loc  
goverkms:
 double val=iForce(NULL,0,period,method,PRICE_OPEN,0);

Thank you for your nice answer, Can you please help me about iStochastic() indicator?

Because there is no a ENUM_APPLIED_PRICE for iStochastic()

Aleksei Beliakov
48815
Aleksei Beliakov  

(NULL,0,5,3,3,MODE_SMA,price_field,MODE_MAIN,0)


Price field parameter. Can be one of this values: 0 - Low/High or 1 - Close/Close.

dinh7loc
352
dinh7loc  
goverkms:

(NULL,0,5,3,3,MODE_SMA,price_field,MODE_MAIN,0)


Price field parameter. Can be one of this values: 0 - Low/High or 1 - Close/Close.

So there is no way to find out what is the amount of iStochastic at open[] candle?
Aleksei Beliakov
48815
Aleksei Beliakov  
i think its mistake in documentation 1 mean open close
Robert Maidla
8882
Robert Maidla  
A good way to determine the selected Stoch line value at an open of the candle would be to use the 'isNewBar()' function as we discussed. Inside the OnTick() function you make an if statement that checks whether a new bar is formed. If so, then check the Stoch value with a shift of 1. Then you'll get an the desired Stoch line value at the open[1].
dinh7loc
352
dinh7loc  
robila:
A good way to determine the selected Stoch line value at an open of the candle would be to use the 'isNewBar()' function as we discussed. Inside the OnTick() function you make an if statement that checks whether a new bar is formed. If so, then check the Stoch value with a shift of 1. Then you'll get an the desired Stoch line value at the open[1].
Thank you, It's nice
To add comments, please log in or register