Dear Support,
Please allow a quick question.
I am back-testing a system that buy at Open and Sell, and Close, and AllowSameBarExit, and 4 open positions, with EOD data.
I have:
SetOption(“InitialEquity”,1000000 );
SetOption(“AllowSameBarExit”,true);
SetOption(“MaxOpenPositions”,4);
SetBacktestMode( backtestRegularRawMulti );
Buy= REF(O>1.001 * C,-1);
Sell = O * 1.001>C;
buyprice=O;sellprice=C;
SetPositionSize( 50, spsShares );
SetPositionSize( 100, spsPercentOfPosition * ( buy == sigScaleOut ) );
It is strange that it does not sell the 4th open position at close when the 4th position is created on the same bar at open. Instead, the detailed log shows:
“Exit ignored because signal predates already processed event”. As a result of this, the system will only sell the 4th open position when the next Sell signal occurs.
I know the message simply means I cannot time travel. Please kindly suggest a workaround to handle such a situation.
Thank you very much and Merry Christmas.
Cheers,
Matt