Moving Average - page 124

 
mladen:
One version of adaptive EMA (exponential moving average) that can control, apart from adapting period, the "speed" (the responsiveness to price changes) of ema too : adaptive_ema.ex4

A peace of advice to anybody trying to code adaptive indicators : do not use mt built in indicators. The problem is simple : whenever you change any of the parameters (calculation length in the case of adaptive ema) it opens a new instance of indicator which :

a) uses only that period for calculation (making a wrong value)

b) uses memory as any other indicator (making it use more an more memory)

c) starts crawling since after some time you might have 100s of instances of the built in indicator and you don't even know it

__________________

PPS: adaptive ema (or any other adaptive indicator I made) does not use built in indicators, so you can freely use them

 
TEAMTRADER:
Hi MLaden,

How I presumed this MA Squeeze indicator would work is that it would assess the value (in difference) between two moving averages. Based on the standard settings of 5 and 21, when it reaches 15 difference (it says threshold on the indicator) it would show when those specific moving averages were 15 pips apart. It does not do that.

I am looking for an indicator that gives an on screen signal and an alert when two chosen moving averages are a specific distance apart (in pips value).

For example, if 5ema was more than 15 pips away from 21 ema I would want to know and backtest to ensure the that the strategy was robust.

I had understood that this indicator did this but it seems it does not do what I hoped it would.

Is there an indicator that gives this information?

TEAMTRADER

Would it be helpful if I gave an illustration MLaden?

TEAMTRADER

 
TEAMTRADER:
Would it be helpful if I gave an illustration MLaden? TEAMTRADER

TEAMTRADER

If you set the ATR_Enable to false, then that indicator works as you presumed (but not when they are exactly at that distance but when they are bellow or equal)

 

DMA indicator

dma.mq4

Files:
dma_mql.png  63 kb
dma.mq4  2 kb
 

Hi,

i was trying to find out, how to detect exact cross of two moving averages in the moment they are crossing and not after i.e one bar,

unfortunately below is not working as expected:

val1 > 0.9999*val2 && val1<1.0001*val2

do you have any idea how to do that?

thanks in advance

 
majfa:
Hi,

i was trying to find out, how to detect exact cross of two moving averages in the moment they are crossing and not after i.e one bar,

unfortunately below is not working as expected:

val1 > 0.9999*val2 && val1<1.0001*val2

do you have any idea how to do that?

thanks in advance

majfa

The cross can be detected only after the fact (when it already happened). You can not predict a cross. Even more, the cross usually never happens on a specific bar, but in between two bars. For that reason, the "classical" ways how crosses are detected, are correct

 

MA segments

ma_segments.mq4

Files:
 

High-Low moving average band

hl_ma_band.mq4

Files:
 
mladen:
Squeezed ema indicator (some were wondering what kind of the indicator it is - here it is) : squeezed_ema.ex4

_______________

PS: period used on the example is 50
mladen:
The "separate" version too (so that it can be compared to similar ones - in my opinion the on chart version is more useful, but now anybody can decide the preferred one) : squeezed_ema_separate.ex4

Dear mladen,

Is it possible to make LSMA this indicator ?

And Separate version too... ?

 
mladen:
Adaptive ema variation with filter (that can filter out insignificant changes in value) posted here (it is already a multi time frame version, that is why it was posted there) : https://www.mql5.com/en/forum/173574/page613

Dear mladen,

Interested with this Indicator.

Is it Posible to make LSMA version ?

Reason: