Updated the colored version (at its original post) with those changes too

brax64: Hi Mladen,

Thanks a lot for your help! I'm glad that now we have this new toy available..

I did a little mod 'cause to follow "at the letter" the Nyquist criterion, the NMA length "must be" at least twice of the sampling period's length , so I added this verification in the code and a note in the external input.

So this one should be the definitive version (v1.1)

Would it be possible to add "last bar" capability to Goertzel Browser 5.53.Last bar=0 It does the analysis and projections from actual bar..Last bar=N it does all that from bar N backwards.This way we can see the indicator´s fit as of late for different combinations of parameters and it may allow a better tuning and more precision...or just more overfitting .

If I understand correctly, you already have that option : BarToCalculate.

By default it is set to use the first closed bar (2) but you can change it to any positive value you wish plus 0 (I myself usually use the 0, even though it changes values all the times). So, just set the BarToCalculate to desired value and it should do the rest. Anyway, will try to add shift to indicator that would correspond to the starting bar of calculation too (the extrapolated values need to be shifted too, and that is what was causing me problems the last time too) and then, if there is an acceptable solution for extrapolation too, it should be "complete"

SIMBA: Mladen,

Would it be possible to add "last bar" capability to Goertzel Browser 5.53.Last bar=0 It does the analysis and projections from actual bar..Last bar=N it does all that from bar N backwards.This way we can see the indicator´s fit as of late for different combinations of parameters and it may allow a better tuning and more precision...or just more overfitting .

If I understand correctly, you already have that option : BarToCalculate.

By default it is set to use the first closed bar (2) but you can change it to any positive value you wish plus 0 (I myself usually use the 0, even though it changes values all the times). So, just set the BarToCalculate to desired value and it should do the rest. Anyway, will try to add shift to indicator that would correspond to the starting bar of calculation too (the extrapolated values need to be shifted too, and that is what was causing me problems the last time too) and then, if there is an acceptable solution for extrapolation too, it should be "complete"

Bar to calculate is not what I meant.What I mean is the same capability as the last bar,included in the Fourier extrapolators you created

int start()

{

int limit,counted_bars = IndicatorCounted();

if(counted_bars < 0) return(-1);

if(counted_bars > 0) counted_bars--;

limit = MathMin(Bars-counted_bars,Bars-1);

int np = PastBars; if (np>Bars) np = Bars;

int nf = FutBars; if (nf<LastBar) nf = LastBar;

if (ArraySize(source) !=np) ArrayResize(source,np);

if (ArraySize(result) !=np) ArrayResize(result,np);

if (ArraySize(prediction)!=nf+1) ArrayResize(prediction,nf+1);

SetIndexShift(1, -LastBar);

SetIndexShift(2,nf-LastBar);

This way we can see the past fit of the indicator,from N bars in the past,with several combinations of parameters,and decide how to use it in the present.

In any case if it is too messy due to the MTF function you can either do a non mtf version for testing parameters,or just skip my request,no problem with that.

We are talking about the same thing but in different terms. With shift added it will be much clearer what did I mean with my post, and I think that you will find that it is what you had in mind too

SIMBA: Bar to calculate is not what I meant.What I mean is the same capability as the last bar,included in the Fourier extrapolators you created

int start()

{

int limit,counted_bars = IndicatorCounted();

if(counted_bars < 0) return(-1);

if(counted_bars > 0) counted_bars--;

limit = MathMin(Bars-counted_bars,Bars-1);

int np = PastBars; if (np>Bars) np = Bars;

int nf = FutBars; if (nf<LastBar) nf = LastBar;

if (ArraySize(source) !=np) ArrayResize(source,np);

if (ArraySize(result) !=np) ArrayResize(result,np);

if (ArraySize(prediction)!=nf+1) ArrayResize(prediction,nf+1);

SetIndexShift(1, -LastBar);

SetIndexShift(2,nf-LastBar);

This way we can see the past fit of the indicator,from N bars in the past,with several combinations of parameters,and decide how to use it in the present.

In any case if it is too messy due to the MTF function you can either do a non mtf version for testing parameters,or just skip my request,no problem with that.

mladen: Simba
We are talking about the same thing but in different terms. With shift added it will be much clearer what did I mean with my post, and I think that you will find that it is what you had in mind too

Mladen,

Ok,and thanks for clarifying.In any case,if it is too messy,just forget about it,no problem with that.

...............

see post https://www.mql5.com/en/forum/179807

...

Updated the colored version (at its original post) with those changes too

brax64:Hi Mladen,

Thanks a lot for your help! I'm glad that now we have this new toy available..

I did a little mod 'cause to follow "at the letter" the Nyquist criterion, the NMA length "must be" at least twice of the sampling period's length , so I added this verification in the code and a note in the external input.

So this one should be the definitive version (v1.1)

Best RegardsFinal revision NMA v1.2

Mladen,

we were both updating the indi and I did erase it...

this is the final version with the colors and last update.

If someone is interested to know exactly how this new moving average is calculated, read the pdf attached.

Best Regards

mladen:Updated the colored version (at its original post) with those changes too

Files:Thanks

mrtools:Hi Maxwell, Try here https://www.mql5.com/en/forum/180100 its in regular elite its a whole thread!

Blessings mrtools I appreciate the link!

Last bar

Mladen,

Would it be possible to add "last bar" capability to Goertzel Browser 5.53.Last bar=0 It does the analysis and projections from actual bar..Last bar=N it does all that from bar N backwards.This way we can see the indicator´s fit as of late for different combinations of parameters and it may allow a better tuning and more precision...or just more overfitting .

Indicator attached here.

Thanks and Regards

S

Files:...

Simba

If I understand correctly, you already have that option : BarToCalculate.

By default it is set to use the first closed bar (2) but you can change it to any positive value you wish plus 0 (I myself usually use the 0, even though it changes values all the times). So, just set the BarToCalculate to desired value and it should do the rest. Anyway, will try to add shift to indicator that would correspond to the starting bar of calculation too (the extrapolated values need to be shifted too, and that is what was causing me problems the last time too) and then, if there is an acceptable solution for extrapolation too, it should be "complete"

SIMBA:Mladen,

Would it be possible to add "last bar" capability to Goertzel Browser 5.53.Last bar=0 It does the analysis and projections from actual bar..Last bar=N it does all that from bar N backwards.This way we can see the indicator´s fit as of late for different combinations of parameters and it may allow a better tuning and more precision...or just more overfitting .

Indicator attached here.

Thanks and Regards

Smladen:Simba

If I understand correctly, you already have that option : BarToCalculate.

By default it is set to use the first closed bar (2) but you can change it to any positive value you wish plus 0 (I myself usually use the 0, even though it changes values all the times). So, just set the BarToCalculate to desired value and it should do the rest. Anyway, will try to add shift to indicator that would correspond to the starting bar of calculation too (the extrapolated values need to be shifted too, and that is what was causing me problems the last time too) and then, if there is an acceptable solution for extrapolation too, it should be "complete"Bar to calculate is not what I meant.What I mean is the same capability as the last bar,included in the Fourier extrapolators you created

int start()

{

int limit,counted_bars = IndicatorCounted();

if(counted_bars < 0) return(-1);

if(counted_bars > 0) counted_bars--;

limit = MathMin(Bars-counted_bars,Bars-1);

int np = PastBars; if (np>Bars) np = Bars;int nf = FutBars; if (nf<LastBar) nf = LastBar;

if (ArraySize(source) !=np) ArrayResize(source,np);

if (ArraySize(result) !=np) ArrayResize(result,np);

if (ArraySize(prediction)!=nf+1) ArrayResize(prediction,nf+1);

SetIndexShift(1, -LastBar);

SetIndexShift(2,nf-LastBar);

This way we can see the past fit of the indicator,from N bars in the past,with several combinations of parameters,and decide how to use it in the present.

In any case if it is too messy due to the MTF function you can either do a non mtf version for testing parameters,or just skip my request,no problem with that.

Regards

S

...

Simba

We are talking about the same thing but in different terms. With shift added it will be much clearer what did I mean with my post, and I think that you will find that it is what you had in mind too

SIMBA:Bar to calculate is not what I meant.What I mean is the same capability as the last bar,included in the Fourier extrapolators you created

int start()

{

int limit,counted_bars = IndicatorCounted();

if(counted_bars < 0) return(-1);

if(counted_bars > 0) counted_bars--;

limit = MathMin(Bars-counted_bars,Bars-1);

int np = PastBars; if (np>Bars) np = Bars;int nf = FutBars; if (nf<LastBar) nf = LastBar;

if (ArraySize(source) !=np) ArrayResize(source,np);

if (ArraySize(result) !=np) ArrayResize(result,np);

if (ArraySize(prediction)!=nf+1) ArrayResize(prediction,nf+1);

SetIndexShift(1, -LastBar);

SetIndexShift(2,nf-LastBar);

This way we can see the past fit of the indicator,from N bars in the past,with several combinations of parameters,and decide how to use it in the present.

In any case if it is too messy due to the MTF function you can either do a non mtf version for testing parameters,or just skip my request,no problem with that.

Regards

Smladen:Simba We are talking about the same thing but in different terms. With shift added it will be much clearer what did I mean with my post, and I think that you will find that it is what you had in mind too

Mladen,

Ok,and thanks for clarifying.In any case,if it is too messy,just forget about it,no problem with that.

S

NMA v1.2.mq4

Dear Mladen,

after reading the pdf about NMA dont you think it would be a good candidate to an EA ?

Best regards

Rosalieone