Forum

Developing a decent EA

I know this question is a bit broad, but I would like to know what things you guys consider important when developing an EA. I don't mean stuff related to MQL5 itself, but regarding trading strategies instead. For example: Do you use indicators? Which ones? Does your analysis happen on multiple

How do I know if my tick data is reliable?

I developed an EA that performs very well backtesting the last year, but when I run it on 2018 the result is a huge loss. 2019 also performs badly. I know that results in a certain year doesn't garantee results in other years. But I would like to be sure if this results are correct. How do I know if

Ask, bid and close: How do they work?

Hello. I'm developing an EA to trade forex and I came upon a problem I can't seem to fix. I'm trying to buy and sell based on the CLOSE price , which is the price that is readable upon looking at the candles, but everytime a moment in which a trade is about to take place, the bot simply ignores my

Back test and demo account have different stop losses

My stop loss is 10 pips, and my EA runs perfecly while backtesting. But when I change it to the demo account to test it in real time, a small percentage of my operations set a wrong stop loss. Normally it sets tio 8 pips and it simply doesn't make any sense for me. Why it sets correctly backtesting

Can I run my EA in a renko chart?

I know Renko isn't native in MT5, but maybe there is a way to do it. I tried googling it but I didn't find anything. (Only people running backtests, but I would like to run it on a real account too)

EA behaving differently in the demo account and backtesting

I developed a EA and it works perfecly fine when I run a backtest on it, but when I insert it on the chart using my demo account, it behaves differently. For example: In the backtest i run it using 1 lot, but for some reason in the demo account on real time it uses 2 lots. I didn't test it on the

Slow performance in a especific function

My backtests take forever to execute when I call this function inside the OnTick: (currentDateLastCheck gets the current day, so I don't store the whole historic) void dailyGain(){ HistorySelect ( StringToTime (currentDateLastCheck), TimeCurrent ()); uint total= HistoryDealsTotal (); ulong

How do I block new orders to be sent until the price hits a moving average?

I'm developing a new robot and I'm having trouble to figure this out.. Lets say my robot opened a new order and it hit my SL. How could I temporarily block new orders to be triggered until the price hits a moving average ? Examples would be great if possible