HOW TO MAKE A BOT FOR EMA CROSS REVERSE STRATEGY WITH NO STOP-LOSS
-
Hello guys,
I’ve tried my best but couldn’t make a proper bot on MT5. My strategy is so simple: The condition repeats and reverses itself through moving averages. Robot must open a Buy position when EMA5 crosses EMA20 above & close when EMA5 crosses EMA20 below. And robot must open a Sell position when EMA5 crosses EMA20 below & close when EMA5 crosses EMA20 above. Simply put, a trade is closed just before the new and opposite trade is created. So, there is no need for stop-loss and robot goes on and on as long as there is enough margin in the account.
Besides, I tried the rules explained in the Buy-Sell-Buy-Sell on opposite conditions section under the Examples menu on the website but It didn’t work. So, could you please show me hot to do it?
Regards…
-
If trade>Condition block>Close Trade.....
However, you'll get whipped in a sideways market....which is 60%+ of the time.....
Jus' saying :))
-
Thank you body. Yeah sideways market is a pain in the neck

And what about "open buy" and "open sell" commands? No need for them? If not, how can I determine the lot size; through constants or variables?
Appreciate it

-
Can try something like this..>>
https://fxdreema.com/shared/vVjSlvPXcCan use variables for lot size or choose from the drop down menu in the Buy/Sell blocks....
Regards*
-
Gonna study it body; thank you very very much.
Best Regards...
-
Hello buddy,
You are right; sideway trend takes back what you earn. So, I’m trying to make a bot with “trailing” stop. My idea for long positions is that when the second candle closes above 100ema, robot will open a buy position. And there are 2 optional rules for closing it: either a second closes below 20ema or it closes with trailing stop. Vice versa, regarding short positions, if a second candle closes below 100ema, robot will open a short position. And again there are 2 optional rules for closing it: either a second closes above 20ema or it closes with trailing stop.
I tried to make a bot as you can see below on MT5 but I guess it is not proper. Could you please check it and share with me its correct design?
https://fxdreema.com/shared/V3P1UF3Lc
Regards…
-
You would have to try Candle Closes Above/Below Moving Average, rather than 'Crosses Above/Below'....
You have Candle ID 2 but crossing ID as 1.....Also I don't think you need the Close Trade block under the Trailing stop, because trade will close if it hits the trailing stop anyway....
If you want 2 candles closing Above/Below Moving average you need two Condition Blocks.
One with Candle ID 2 and then one With Candle ID 1....See if that helps...
Regards* -
Thank you
I tried to revise it according to what you said. Can you please check below if I've understood you correctly?https://fxdreema.com/shared/caz3HC2wd
Regards...
-
Yes looks ok....Does it work in the MT4 Strategy Tester....?
Regards*
-
Since I have Mac, I use the parallel desktop application for windows and somehow mt4 doesn’t work on it. I tested it on mt5 and it seems ok but I have to play with the averages in order to have better results I guess.
Besides, it is difficult to create a buy or a sell condition with bar closes on averages, right? Even on the website says “it’s tricky because the current price is a value that changes over time and it does than in irregular steps. More than that, indicator values also change because of the price”. I just couldn’t make it work… I mean I just want 2 consecutive bar closes above or below a moving average so that the third bar will be the buy or the sell order. I tried several combinations with Candle ID, Cross Width, open price, high- low and close prices but they only made me confused. Beside that, I think that a candle close price on fxdreema doesn’t mean the last price just before the bar closes. I think it refers to the real time price which changes over time as long as the bar is open, right? Do you have a practical solution for that buddy?.. Just 2 consecutive bar closes above or below a ma and the open price of the third bar will be the buy or the sell order.
Regards…
-
Sorry I mentioned MT4....I see now that you are using MT5....
So no, it won't work on MT4.....
So keep at it on MT5* :-))
-
Hello bro, is that robot possible to make on fxdreema?.. If yes how can we make it? Rules are that we determine a main sideway range within 2 exact price levels up and down and then divide that band range in to 3 ranges so that robot opens long positions whenever price goes up and hits the nearest inside range level above and stops out whenever it drops down to the nearest inside range level below. Likewise, robot opens short positions whenever price drops down and hits the nearest inside range level below and stops out whenever it goes up to the nearest range level above. Of course, there will be no trades outside that main sideway range. How can we make that?
-
Have a look at this YT channel....>> https://www.youtube.com/@Boxxocode/videos You will probably find your answers there....
I think the main issue is how to know when the market is going into a ranging mode...
-
I've watched and tried to make a lot robots via boxxocode YouTube channel, however, I couldn't find a solution yet. Thanks anyway bro. Regards...