Moving Average - page 33

 

If you need a MACD that works like the "realMACD" you can find them here on TSD as source (all you are looking for is a MACD that calculates signal line as EMA not SMA - among others here is one https://www.mql5.com/en/forum/178416/page5)

If you want to make MACD purely using MAs (without making a separate indicator), you can not :

1. MACD is FastEMA-SlowEMA (you can not make metatrader draw just the difference without coding it in an indicator)

2. Signal line is EMA of MACD

3. Osma is MACD-Signal (the same as for MACD)

btw: there seems to be a problem with the realMACD. If someone can figure out what values are shown with yellow bars that would be great, because those values have no logic at all (they look like OSMA but those values for sure are not OSMA)

tcl:

Dear all,

attached here the indi (realMACD.ex4) and when I see in the Inputs Variable there are the info:

- FastMAPeriod = 12

- SlowMAPeriod = 26

- SignalMAPeriod = 9

can anyone here help me do the samething (I mean can I get the same line - blue and red ?) with Moving Average (the standart indicator in metatrader) ??

- MA Period ?

- Shift ?

- MA Method ?

- Apply to ?

thanks for the attention

Files:
comparison.gif  22 kb
 

:)

mladen:
If you need a MACD that works like the "realMACD" you can find them here on TSD as source (all you are looking for is a MACD that calculates signal line as EMA not SMA - among others here is one https://www.mql5.com/en/forum/178416/page5)

If you want to make MACD purely using MAs (without making a separate indicator), you can not :

1. MACD is FastEMA-SlowEMA (you can not make metatrader draw just the difference without coding it in an indicator)

2. Signal line is EMA of MACD

3. Osma is MACD-Signal (the same as for MACD)

btw: there seems to be a problem with the realMACD. If someone can figure out what values are shown with yellow bars that would be great, because those values have no logic at all (they look like OSMA but those values for sure are not OSMA)
newdigital:
Can not do anything with ex4 file sorry (it should be mq4 file). Besides, I am not a coder so ...

wow.. I'm so greatfull that 2 master here (mladen and newdigital) give an attention to me

newdigital:

I tried to find the mq4, and I got it and attached here, pls take a look...

thanks.

mladen:

actually I just need to know how we can draw a same lines (the red and blue line in realMACD) with standart MA indicator from metatrader terminal ?

thanks.

Files:
realmacd.mq4  4 kb
 

if translate in English - what does this mean :

alpha = 2.0 / (SignalMAPeriod + 1.0);

alpha_1 = 1.0 - alpha;

MACDLineBuffer = iMA(NULL,0,FastMAPeriod,0,MODE_EMA,PRICE_CLOSE,i) - iMA(NULL,0,SlowMAPeriod,0,MODE_EMA,PRICE_CLOSE,i);

SignalLineBuffer = alpha*MACDLineBuffer + alpha_1*SignalLineBuffer;

HistogramBuffer = (MACDLineBuffer - SignalLineBuffer) * 2;

 
fxbs:
if translate in English - what does this mean :

alpha = 2.0 / (SignalMAPeriod + 1.0);

alpha_1 = 1.0 - alpha;

MACDLineBuffer = iMA(NULL,0,FastMAPeriod,0,MODE_EMA,PRICE_CLOSE,i) - iMA(NULL,0,SlowMAPeriod,0,MODE_EMA,PRICE_CLOSE,i);

SignalLineBuffer = alpha*MACDLineBuffer + alpha_1*SignalLineBuffer;

HistogramBuffer = (MACDLineBuffer - SignalLineBuffer) * 2;

shame on me....

fxbs !!!

I just a newbie with mq4 programming, need to learn more.... he...he..he..

thanks FXBS, you are the best !!!

 

don't worry - i had(have) no idea myself too

it's kinda :

void ema()

pr=2.0/(MA_Period+1); ....

ExtMapBuffer[pos+1]=Close[pos+1];.....

ExtMapBuffer[pos]=Close[pos]*pr+ExtMapBuffer[pos+1]*(1-pr);

 

see his decimals- and his osma multiplier was set to *2 - that was giving "wierd" numbers

Files:
 
fxbs:
see his decimals- and his osma multiplier was set to *2 - that was giving "wierd" numbers

but they get the same result ...

 

BIAS indicator

Hi, guys, attached is an indicator named "BIAS" which indicates the distance between a designated EMA and the current price. I would appreciate if someone can help me to convert it to a colored bar indicator as the EMAAngle in the attached pic!

Thanks a lot!!

Files:
ej.gif  43 kb
bias.mq4  3 kb
 

This indicator https://www.mql5.com/en/forum may be usefull as well but it is not colored the bars as I know.

 

Thanks a lot ND! The indicator you recommended is great!

However, it can only show the current distance between a MA and the price. The purpose of BIAS is not only to show the current distance, but also allow traders to compare the current distance with the previous distance, so that traders are easier to deceide whether a trend is near to the end and a rally is coming.

The attached BIAS can do the above function, however I just hope someone can make it to a BAR indicator. You know, I like BAR indicator which I think is much better in terms of showing slight changes.

I am looking forward to seeing a great, nice, kind guy do me a little favor! A million thanks in advance!

Reason: