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
- 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.
- 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.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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