MA Candles - page 2

kermut
55
kermut  

thanks for the reply cja, but I just don't get it.

My ma on the chart are ema, but in the ma candles indicator, there is no option to actually set the ema as sma, ema or lwma. Also, my ma are not shifted in anyway. My settings in the indicator are MA1 = 34 MA2 = 150, and the rest are all zeros. What am I not doing right?

Thanks in advance.

Regards,

K.

ccjjaa
2041
ccjjaa  

indicator settings

kermut:
thanks for the reply cja, but I just don't get it.

My ma on the chart are ema, but in the ma candles indicator, there is no option to actually set the ema as sma, ema or lwma. Also, my ma are not shifted in anyway. My settings in the indicator are MA1 = 34 MA2 = 150, and the rest are all zeros. What am I not doing right?

Thanks in advance.

Regards,

K.

You have pointed out the problem the rest should not be all zeros

MODE_SMA = 0 Simple moving average,

MODE_EMA =

1

Exponential moving average,

MODE_SMMA = 2 Smoothed moving average,

MODE_LWMA = 3 Linear weighted moving average.

PRICE_CLOSE = 0 Close price.

PRICE_OPEN = 1 Open price.

PRICE_HIGH = 2 High price.

PRICE_LOW = 3 Low price.

PRICE_MEDIAN = 4 Median price, (high+low)/2.

PRICE_TYPICAL = 5 Typical price, (high+low+close)/3.

PRICE_WEIGHTED = 6 Weighted close price, (high+low+close+close)/4.

You need to change the MA1_MODE & MA2_MODE to

1

extern string IIIIIIIIIIIIIIIIIIIII=">>> MA Settings >>>>>>>>>>>>>>>>>";

extern int MA1 = 34;

extern int MA2 = 150;

extern intMA1_MODE = 1;

extern intMA2_MODE = 1;extern int MA1_PRICE = 0;

extern int MA2_PRICE = 0;

extern int MA1_SHIFT = 0;

extern int MA2_SHIFT = 0;

After you change the MAs to EMAs you will notice that the Comments on the top left of the chart also change to reflect those settings

cja

[Deleted]  

anyone can share what the best ema setting for forex?

alligator? 25ema+50ema? other?

kermut
55
kermut  

many thanks

Many thanks cja,

It is working now.

Now to take this one step further, I am seeing that the candles are coloured according to one ma being above/below the other. Is it possible to actually do something to the candles so that they colour the way they are atm, but show a different/colour if the price goes above a certain ma. eg in my chart, the candles stay red so long as 34 ema stays below 150ema, even if the price is above 34ema or 150ema. Since I am not playing crosses of ema, but rather price break of an ema, it would be helpful if there is a way to see if price is above or below that particular ema.

Many thanks in advance.

Regards,

K.

ccjjaa
2041
ccjjaa  

Price MA

kermut:
Many thanks cja,

It is working now.

Now to take this one step further, I am seeing that the candles are coloured according to one ma being above/below the other. Is it possible to actually do something to the candles so that they colour the way they are atm, but show a different/colour if the price goes above a certain ma. eg in my chart, the candles stay red so long as 34 ema stays below 150ema, even if the price is above 34ema or 150ema. Since I am not playing crosses of ema, but rather price break of an ema, it would be helpful if there is a way to see if price is above or below that particular ema.

Many thanks in advance.

Regards,

K.

If you want to have the price displayed as a candle color set one of the MAs to MA_Period = 1; and that will tell you when price is above or below the other MA just like you have 34 & 150 now you could have 34 & 1 for example and put the 150 as a line on your chart

cja

funske
19
funske  

pricebar close above/under ma

Hi, I am looking for an indicator which puts an arrow under (above) the candle that closes above (or under) a moving average. I have seen this basic indicator before but can't find it back anymore.

I am definitely not a coder so I would appreciate it if anyone can point me to this indicator or has something similar which I can modify.

Thanks.

Sergey Golubev
Moderator
118951
Sergey Golubev  

I moved your post to this thread because i think it is probable what you need.

The other usefull thread is this one https://www.mql5.com/en/forum/general

The other thread https://www.mql5.com/en/forum/175811

funske
19
funske  

Yes thanks.

Forex Lasers
624
Forex Lasers  
darkkiller:
anyone can share what the best ema setting for forex? alligator? 25ema+50ema? other?

What is "best" is all subjective. You have to find what's fits your style.

xiii
500
xiii  

A Baby Trader.........

teach me how to trade the MA candle........enter position,exit,money management.........please....