Buy and Short on the same bar with different entry and same exit

Hi All,

I am coding a backtest which will trigger BUY and SHORT at the same bar, with different entry price but same exit. Since I only got daily data, I can't test this with intraday and above would happen in the same bar.

I checked the document about "backtestRegularRawMulti", it is talking "for more than one bar". Would like to see if there is any method I can backtest with BUY and SHORT, and closed both of them in a single bar?


* **backtestRegularRawMulti** - signal-based backtest, redundant (raw) entry signals are NOT removed, MULTIPLE positions per symbol will be open if BUY/SHORT signal is true for more than one bar and there are free funds,


You can post your code, its easy to undestand with full code.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.