Codes

Classic Moving Averages with colors for MetaTrader 5

The indicator displays a colored moving average

Forum

Calculation of EMA

Hi, In my learning of MQL4, I try to rewrite the exponential moving average (EMA). For this I'm using the rewritten version . EMA(i) = EMA(i-1) + alpha * [Price(i) - EMA(i-1)] The problem is my ema is very different of MT4 ema. Someone can tell me what is going wrong with my code please //----

Display more than 8 buffers in custom indicator.

Hello guys I'm trying to build a custom indicator.I'm a newbie in mql4 developpement. I read https://book.mql4.com/samples/icustom and I know MQL4 allow drawing uop to 8 indicator lines. I used 4 buffers to colors the candles. Now I'd like to display at least 12 lines more but It doesn't work. I

iRSI() does not open an order at price close

Hi everybody, I am new at MQL4 coding. I have searched on the forum but I didn't find any answer or explanation. I am trying to write an EA to open an order when specific conditions are met: double RSI1 = iRSI ( NULL , PERIOD_H1 , 21 , PRICE_CLOSE , 0 ); double RSI2 = iRSI ( NULL , PERIOD_H1 , 21