Forum

4 & 5 points calculation issue

Hello, in the above image Exponential Moving average = 1.13688 > (EMA) HeikenAshi Close = 1.13687 > (HAClose) in my EA I have program condition if HAClose is less than EMA than do some work. I want to do this work on 4 digit basis like: EMA = 1.1368 HAClose = 1.1368 now in this case

Getting different values of Heiken Ashi candles in Data Window & in my code

Hello, Why I am getting different values of Heiken Ashi candles in Data Window & in my code values I am getting from my code is mentioned in highlighted logs. Can anyone guide me where I have made the mistake? // Here is he chunk of code datetime H1,H4; double

How to get same time values of H1 & H4

//H1 Calculations H1HaOpen= iCustom ( NULL , PERIOD_H1 , "Heiken Ashi" ,Red,White,Red,White, 2 , 1 ); H1HaClose= iCustom ( NULL , PERIOD_H1 , "Heiken Ashi" ,Red,White,Red,White, 3 , 1 ); H1EMAprev = NormalizeDouble ( iMA ( NULL , PERIOD_H1 , 14 , 0 , MODE_EMA , PRICE_CLOSE , 1 ), Digits ());

How to detect Heiken Ashi Body close above/below MA?

Hello, I am newbie in MQL4. I would like to know how I could detected that Heiken Ashi Body close above/below MA

NormalizeDouble() not working

StopLossBuy = NormalizeDouble ( Low [ 2 ] - 0.0003 , Digits ()); //1.1304799999999999 StopLossBuy = NormalizeDouble ( Low [ 2 ] - 0.0003 , 5 ); //1.1304799999999999 I have tried both code from both code after decimal value appearing 16 digits. Where I have made mistake

How to detect pullback of market in MQL4 EA?

Hello, I have attached a picture I have mentioned my question in that picture. Experts Please answer my question. Questions: 1. I want to ask what is stoplevel & freezelevel? please explain me in simple words I am not able to understand reference documentation. 2. How could I detect market pull back

OrderSend failed with error #130

Hello, I am getting Error: EURUSD ,H4: OrderSend failed with error #130 void OnTick () { H1EMAprev = NormalizeDouble ( iMA ( NULL , PERIOD_H1 , 14 , 0 , MODE_EMA , PRICE_CLOSE , 1 ), 5 ); H4EMAprev = NormalizeDouble ( iMA ( NULL , PERIOD_H4 , 14 , 0 , MODE_EMA , PRICE_CLOSE , 1 ), 5 );

ordersend failed with error #130

Hello, I am getting error # 130 while trying to OrderSend() in MQL4. LotSize = 0.05 ; // 0.05 Lot SLPips = 0.00030 ; // 3 pips TpFirstOrder = 0.00100 ; // 10 pips TpSecondOrder = 0.00150 ; // 15 pips StopLossBuy = Low [ 2 ] -

How to identify current trend of MA through code?

Hello, I am writing an EA but I am beginner in MQL4. Please suggest me how could I identify a DOWN TREND or an UP TREND of moving average in my EA programmatically? Please advise me as I have not so familiar with MQL4

How to check in MQL 5 Account type is demo or live?

Hello Everyone, I am vew new in MQL 5 programming please guide me that how could I check in MQL 5 that Account type is demo or live ? Thank u in advance. Regards, Kumail Raza