No one to help me ?.

I would imagine it would have something to do with re-writing a custom MA indicator that looks at average values of the indicator you want. Should really just be a case of replacing the price values in the current MA indicator with iStochastic values then you can just use iCustom() to call the custom indicator. I think.

here's the simple moving average code from the MA indicator that comes with MT4, should just be a case of replacing the Close[pos] with iStochastic(...,[pos]) values i think

void sma()

{

double sum=0;

int i,pos=Bars-ExtCountedBars-1;

//---- initial accumulation

if(pos<MA_Period) pos=MA_Period;

for(i=1;i<MA_Period;i++,pos--)

sum+=Close[pos];

//---- main calculation loop

while(pos>=0)

{

sum+=Close[pos];

ExtMapBuffer[pos]=sum/MA_Period;

sum-=Close[pos+MA_Period-1];

pos--;

}

//---- zero initial bars

if(ExtCountedBars<1)

for(i=1;i<MA_Period;i++) ExtMapBuffer[Bars-i]=0;

Hi,

I'm new in programming MQL4, I'm trying to calculate the mving average of an indicator in an EA.

Could someone give me a code example of :

- The moving average of x period of the volume of a symbol ?

- The moving average of x period of the slow stochastic(5,10,3) of a symbol ?

Thanks in advance for your help.