Forum

In Backtest or Demo Account Order is being executed by the last price

Hi all, I was surprised when I find out that in backtest and in demo accounts orders are being executed by the last price instead of bid/ask of the Symbol. Does MT5 works like that? Anyway I can change it to be executed by the bid/ask? I tried with TRADE_ACTION_DEAL and TRADE_ACTION_PENDING . In

How to know the Deal Price of a Market Order

Hi everyone! I need to know in what price a market order was executed. Do I need to get the history values of a Deal, or is there an easier way? Regards, Roberto