Setting the limit time in the Strategy Tester

 

Hi .

Is it possible to set a time limit on the backtest?
I found an expert advisor who does not open a position even in the backtest from 2021 to today.
Several people commented that this expert only opens positions based on the history that is placed inside it, and its strategy is fake, and it opens positions based on pre-determined data. Is this possible?
I myself run the TimeCurrent() function in the tester strategy and the output was always D'1970.01.01' .

And based on the output of the TimeCurrent() , the program cannot be instructed not to open the position if the TimeCurrent is greater than a certain date

Testing trading strategies on real ticks
Testing trading strategies on real ticks
  • www.mql5.com
The article provides the results of testing a simple trading strategy in three modes: "1 minute OHLC", "Every tick" and "Every tick based on real ticks" using actual historical data.
 
tinivini: Is it possible to set a time limit on the backtest? I found an expert advisor who does not open a position even in the backtest from 2021 to today. Several people commented that this expert only opens positions based on the history that is placed inside it, and its strategy is fake, and it opens positions based on pre-determined data. Is this possible? I myself run the TimeCurrent() function in the tester strategy and the output was always D'1970.01.01'. And based on the output of the TimeCurrent() , the program cannot be instructed not to open the position if the TimeCurrent is greater than a certain date
  1. TimeCurrent() does provide the correct date and time of the trade server, both on a live chart and in the strategy tester. If you are only getting D'1970.01.01' then you are doing something incorrectly in your code.
  2. Yes, it is possible to limit an EA to only work within certain time periods, but it is against Market product rules to do that. If you suspect that, then report it to the service desk, but make sure you provide proper proof and not just speculation.