About coding prices for STDEV in mql4!

 
Why did you post your MT4 question in the General section (a miscellaneous catch-all category) instead of the MQL4 section, (bottom of the Root page)?
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
moved to MQL4 and MetaTrader 4

In mql4, If I wanted to get the value of iStdDev at the the Opening price at the moment of the opening candle, let`s say on Daily TimeFrame, I wrote:  iOpen(iStdDev(NULL,0,IndicatorPeriod,0,MODE_SMA,PRICE_CLOSE,i)), but it did not work! How to do that?

 
Robert Milovic: iOpen(iStdDev(NULL,0,IndicatorPeriod,0,MODE_SMA,PRICE_CLOSE,i))

What you wrote is nonsense. If you want the SD of the open, write that

iStdDev(NULL,0,IndicatorPeriod,0,MODE_SMA,PRICE_OPEN,i);
 
No, it its's not a nonsense! That is not what I wanted and asked for. Instead o f clastic type of only open prices, which everybody knows how to write, I need the code for only open of the first candle and for the rest of the candles I need closing prices, for example: open of the 1st candle, close of the 2nd candle , close of the 3rd candle and so on meaning: 1st open , 2nd close, 3rdclose and so on of the iStdDev. In other words I need the value of the iStdDevof cloing prices at the moment of the candle Open
 
Robert Milovic #:
No, it its's not a nonsense! That is not what I wanted and asked for. Instead o f clastic type of only open prices, which everybody knows how to write, I need the code for only open of the first candle and for the rest of the candles I need closing prices, for example: open of the 1st candle, close of the 2nd candle , close of the 3rd candle and so on
  1. I said the code you wrote is nonsense: iOpen( aDouble ) Read the definition. It requires three parameters.
  2. Now that you have explained yourself properly, read your values into an array and use iStdDevOnArray
 
I understand! But could you be more specific on how and what array I should code it as I tried that too, but it always returned an error. How would you do it yourself?
 
What ExtBuffer to use? I tried it
 
Robert Milovic #:
What ExtBuffer to use? I tried it

Code Base

Standard Deviation (StdDev)

MetaQuotes, 2005.12.20 15:38

The Standard Deviation Indicator (StdDev) measures the market volatility.
(Source code with buffer in linked page).
 
OK, Thanks! That might have been the missing link!