Libraries: IncMAOnArray

 

IncMAOnArray:

CMAOnArray class is used for Moving Average calculation on indicator buffer's data.

The Moving Average Technical Indicator shows the mean instrument price value for a certain period of time. When one calculates the moving average, one averages out the instrument price for this time period. As the price changes, its moving average either increases, or decreases.

Author: Дмитрий

Example of use of CMAOnArray class

 

Thanks Dimitri, it's very useful,

it's a pity that MQ doesn't have the technical capability to do it as a standard indicator.

 

Thanks a lot for the idea but i don't uderstand these things:

1) how to get access to the array MABuffer and data (filled by indicator Test_MAOnArray) from an Expert?

2) Could you provide an example, very simple, like print( data[0], MABuffer[0])).

3) Do I have to call iCustom or somenthig differently?

Thanks and sorry... i'm a newbe!

 
maximaxx:

Thanks a lot for the idea but i don't uderstand these things:

1) how to get access to the array MABuffer and data (filled by indicator Test_MAOnArray) from an Expert?

2) Could you provide an example, very simple, like print( data[0], MABuffer[0])).

3) Do I have to call iCustom or somenthig differently?

Thanks and sorry... i'm a newbe!

1. Just like to access any other custom indicators - by iCustom() function and CopyBuffer() function.

2. Excuse me, no. See docs and articles.

3. Yes.

All my OnArray classes must be used in indicators only, do not try to use them in experts.