Forum

Getting the current day history data?

I always seem unable to backtest the current day's data in the strategy tester . On any given day, the data in the backtester only seems to go up to midnight the day before. Clearly the data is in the terminal. Is there any way to force MT5 to update the history data to allow a backtest on the

Does closing orders require enough money in the account to open the opposite position?

I am trying to partially close a position, but I'm getting a lot of 10019 errors (" There is not enough money to complete the request") in backtest. It is most likely that I am using the wrong volume when I try to close, and trying to close the existing order with more volume than it already has. (I

How to use ParameterSetRange?

What is the correct way to use the ParameterGetRange function? I know that it only works in the OnTesterInit function. Here is the code I am using, eg.: void OnTesterInit() { ParameterSetRange("VariableName", true , 1.0 , 1.0 , 1.0 , 2.0 ); } VariableName is an input double datatype. Compiles fine

Change strategy tester graph?

I know the answer is probably no ... but does anyone know if it is possible to change the graph of results (graph tab) in the strategy so that it displays something other than "Margin Level" in the mini green graph under the "Balance / Equity" graph? For example, it would be great to be able to see

"10008 - TRADE_RETCODE_PLACED" vs "10009 - TRADE_RETCODE_DONE"

What is the practical difference between " 10008 - TRADE_RETCODE_PLACED" and "10009 - TRADE_RETCODE_DONE"? https://www.mql5.com/en/docs/constants/errorswarnings/enum_trade_return_codes

Backtest results not displayed when test finished

Sorry to ask such a noob question. This has probably been answered before, but I've tried every way of phrasing this question in searches that I can think of, and have found no answer. Very often when a backtest finishes it does not seem to display the results in the "Results" tab of the " Strategy

Automatically end backtests/optimizations early?

Is there a command which can forcefully stop a runthrough of a backtest or optimization pass from within the EA code? Also, in MT4 there is an auxiliary list of optimization parameters for the inputs which will stop an optimization pass if a value is exceed. For example, maximum % drawdown can be