EA works fine on admiral markets mt4 but doesn't work on fxpro mt4.
-
Hi guys,
I have an EA which works perfectly on the Admiral Market's mt4 , but when I tried it with antoher broker's mt4(fxpro), it does not work perfectly.
This is the project:
https://fxdreema.com/shared/ANX2m24heThe EA should open a buy stop and a sell stop based on the last hourly candle's high and low.
The following problem occurs when testing with fxpro's mt4 platform:
It only opens one pending order instead of two, and i dont know why. -
-
@monocska3310 So it opens only sell order, no buy, or vice versa?
I don't see why it would do that. I tested it and it opens two orders:

Are you intentionally filtering this to work on only the 01:00 - 02:00 hourly candle?
-
Yeah, it should work between 01:00 and 02:00.
I will test it again today, I dont know whats the problem. with my mt4.
Thanks -
This is one of the things that amazes me about fxDreema. This is not the first case in which one MT4 platform works different from another one. I guess the reason must be the broker, not the MT4 platform. I tested it on my MT4 and it (also Admiral) and yes, it works fine.
How things like this can happen?
-
So, I tested it agan and checked the logfile.
Everytime it says Order send error:130
Maybe it is because my pending order opening price ic too close to the current price?
-
@monocska3310 Well, the errors refer to invalid stops. Try a version that uses larger SL and TP, or none at all
-
@monocska3310 If the reasin is as @roar said that the stops are too tight to the market price (you can check stop level in symbol specifications), you might check that value before setting the SL / TP.
You can create a new double variable and on the onInit tab you can calculate it by using a Custom MQL code block.
That might look like this:

And here the code where vd_min_dtoplevel is the variable I specifed before in fxdreema:
//
vd_min_stoplevel = MarketInfo(Symbol(),MODE_STOPLEVEL);// Print the Minimal Stop level on init of the EA
string msl = "MinStopLevel = "+DoubleToString(vd_min_stoplevel,8);
Print(msl);
// -
SOLVED
Thank you guys. The problem is with the broker's stop level. On FxPro it is 20, on Teletrade it is 40, and on Admiral it is 0.
The price was too close. -
I was almost sure the problem was the broker.