Test Log Shows Position Exit on Final Bar

Posted By: BigSky

Test Log Shows Position Exit on Final Bar - 06/03/21 17:33

It seems like the Zorro test always shows a final trade on the last bar of the series which exits any open positions. It does this regardless of whether or not there is an actual signal to exit the open trade.

Is this correct?

Is it to facilitate P&L calculations?

I find it a little confusing: I don't see an easy way to distinguish between a theoretical close-out of an open position on the final bar, vs. an actual signal to exit the trade.
Posted By: anissyo

Re: Test Log Shows Position Exit on Final Bar - 06/03/21 23:04

i am just a novice but here is the solution i am thinking of :
All trades get closed at the last bar, so if you have a large amount of trades opened when the simulation reache the last bar, it could possibility alter your backtest result, the solution is simple get more historical data so that the portion of trades closes be cause of the end of the backtest become insignificant compared to the trades closed by your exit signal.

in my own backtestes the trades closed be cause the simulation ended are not more than 3% of the total number of trades.
Posted By: jcl

Re: Test Log Shows Position Exit on Final Bar - 06/04/21 09:43

To keep trades open, use the OPENEND flag.
© 2024 lite-C Forums