Forum

MT4 not auto connecting after ping fail

Hi guys and gals ;) I'm having big trouble with MT4 connection issues. I run multiple MT4's on a dedicated server with low latency to my brokers 1-2 milliseconds. However, quite often (1-2 times a day) MT4 keeps dropping the connection. Now, most of the time it will reconnect back within a second

Does MQL4 code runs in the seqance i write code?

Hi, I'm sorry if this is stupid question, but I'm new to coding. Does the code I write in MQL4 is read by MT4 in the order i write code? I`m asking this as I have 2 peaces of code contradicting one and another. But wondering if in this case the last code will be used over the first one? Here is the

How to get MA values that are shifted forward???

Please help me out, is this possible??? I use some shifted MAs, similar to alligator . I`m writing simple indicator to help me out when price crosses these MAs. I need to call MAs values that are in front of the price, eg -3,-5,-8, but not sure how to do this. I can easy get current price + shifted

zero divide error

Hello. Can anyone shed some light on this? I`m geting zero divide error when my EA calculates lot size. It only happens in Strategy tester on EURUSD and USDJPY when testing in tick mode ( control points works fine) This is the code I use: double lot = MathFloor (((risk / NumberOfOrders)) /

Strategy tester on weekly chart?

Hi. Has anyone managed to test EA on weekly chart? I know MT4 doesn't allow testing on weekly by default. I tried the steps as outlined in article: https://www.mql5.com/en/articles/1368 I can substitute Daily chart data with weekly chart data, but I can't use tick mode testing as MT4 thinks I`m

Strategy tester in offline mode

Hi. I want to test my EA in offline mode, but having trouble getting the EA to calculate correct lot sizes when in offline mode as you know MarketInfo returns 0 values when in MT4 is in offline mode. There are other posts about this issue, but none of them seem to have a solution for this. One of

Question about strategy tester.

Hi all. I'm experienced trader, but quite new to automated trading. I'm trying to automate my trading strategy and test it using strategy tester . The issue I have is that my strategy looks at all availble fx pairs and then chooses just 1 pair to trade based on my given parameters. But strategy

Tickvalue in strategy tester???

Hi. I'm new to mql4 language, but I understand the basics. I'm testing my EA on Stretegy tester, but noticed that on some pairs (USDJPY,USDCHF,USDCAD) lot size calculation is off. I use this function to get tickvalue and on real trading it works fine, also on most of the pairs in Stretegy tester