No Trades when Backtesting Period is longer

Posted By: TimmiHendrix

No Trades when Backtesting Period is longer - 05/11/21 10:31

Dear Community

First of all I wanted to thank the developers for this amazing tool and the community for being kind and interested.



So I wanted to extend my backtesting period from 1 to 3 (or more) years but when I do it returns no trades. Ergo, no backtesting results (FYI: I use several optimize functions, just in case this has anything to do with it).

First, I checked if I misspelled something in the code on accident but it doesn't seem so: When I change back the backtest period to one year it works again.

Second, I checked if I have the data needed to do the backtesting, and I do.

Third, I thought about being margin called, but there is no such message plotted and there is no equity curve at all anyways.

4th, I thought about that the algorithm is just not getting "good" signals so that it doesn't trigger any trades, but if this was the case, wouldn't there be an equity curve?

5th, I thought about exceeding the Zorro free version backtest period but since I'm going with 60min / 4h bars and since I used the same bar length for much longer backtesting periods before this doesn't make sense to me.
Edit: And even if I exceeded the Zorro free backtest period, wouldn't it then just not take all data but use only to the max amount?


I'm pretty sure that I'm missing something very crucial but at this point it just doesn't come to my mind. If there is anybody out there that has had the same problem, enlighten me!

Many thanks in advance

Tim


PS: As attachment a screenshot of the result plot (as one can see, it only shows the price curve)


Attached picture Capture.PNG
Posted By: jcl

Re: No Trades when Backtesting Period is longer - 05/11/21 12:19

If your script does not trade depending on the backtest period, something is wrong with the code, possibly with a static or global variable. For finding out, plot or print the signals and check which one has no valid value.
Posted By: TimmiHendrix

Re: No Trades when Backtesting Period is longer - 05/11/21 15:47

Thank you very much Johann! Especially for the super fast reply!

Best

Tim
© 2024 lite-C Forums