EA on MT5 - (M5 timeframe) opening trades against trend (Please Help Fix Ex.5)
-
Basically, what happens is my EA when price action is below Simple Moving Average 48 will open buy trades, which is completely trading against the trend, is there a way to fix this and to tell the EA just to open sell trades if price action is below SMA 48 on M5 timeframe? and buy when the price action is above SMA 48 on M5 timeframe?
I can attach my ex.5 ea here if you can help, thanks
-
@denk777 Put a shared link on here so things can be checked.
-
@jstap Thank you for your reply, I will attach my EA here for you to check 0_1647597498764_dk3113.ex5
-
@denk777 Ea is no good, can only help is is created on FX.
-
@jstap Ok, let me create one using Fxdreema and send it here
-
@denk777 OK
-
@jstap Ok, I tried to build it but not sure if I did it all properly, please check EA attached:
(1) EA to open a BUY position, when EMA 7 crosses above EMA 25, and crosses above EMA 99 and bullish candle closes above these three EMA's
(2) EA to open a SELL when 7 EMA crosses below EMA 25 and crosses below EMA 99 and the bearish candle closes below all three EMA's
Also would be nice if EA could have a configurable Take Profit, Trailing Stop and Stop Loss that could be adjusted in the EA settings on MT4, but I don't know how to add these.
EA attached.
Thanks alot for your help! Appreciate!
0_1647626024979_denk-v1.ex4 -
@denk777 That's the ex file, if you go to projects in the top left, create a shared link, open in your web browser, copy & past here. Can then open in FX to see what has been done.
-
@jstap Here is the link: (https://fxdreema.com/shared/rk9Xw2r5)
-
@denk777 This is the logic in that, no buy or sell trade, ma X ><, bull or bear candle on candle 1, place buy or sell. The middle condition blocks do nothing as they would need to be inline.
-
@jstap Hi, thank you, so what needs to be done? can you please provide a screenshot and show me what needs to be removed, replaced or changed?
-
@jstap Is this correct now? >> (https://fxdreema.com/shared/2vzQfWtNb)
(1) EA to open a BUY position, when EMA 7 crosses above EMA 25, and crosses above EMA 99 and bullish candle closes above these three EMA's
(2) EA to open a SELL when 7 EMA crosses below EMA 25 and crosses below EMA 99 and the bearish candle closes below all three EMA's
Also would be nice if EA could have a configurable Take Profit, Trailing Stop and Stop Loss that could be adjusted in the EA settings on MT4, but I don't know how to add these.
-
@denk777 https://fxdreema.com/shared/8fvKBJ3J Have separated the buys and sells, if you want only 1 of either type add back to how it was.
-
@jstap thank you for your help, will test on MT4
-
@jstap Hello, do you know by any chance how I can convert my EA ex.4 file to ex.5....I would like to test my EA on MT5 instead, do you know an easy way to convert without affecting EA features? thanks
-
@denk777 No mate, don't think it's possible without the MQ files.
-
@jstap Ok thanks
-
@jstap Hi I downloaded your EX4 setup >> https://fxdreema.com/shared/8fvKBJ3J
But it does not seem to work on MT4 ... I added EX4 file, enable auto trading on MT4 but trade was not opened when all conditions were met, can you check why? 0_1648062466444_unnamed (4).ex4EA missed 2 trades on M5 (BTCUSD pair) , what could be the issue? >> https://snipboard.io/kgnbqS.jpg
-
@denk777 When tested on back test it places trades for me.
-
@jstap I noticed the EA does not respect the conditions at all, and on the settings, I have lot size 0.01 but it opens lot with 0.10 can you tell me why this EA does not respect all conditions? does Fxdreema when generating ex4 make errors so that is the reason EA does not work properly?