In a backtest, is it possible to drop an individual trade from the output because of a certain exit has been hit? To clarify, if there is a specific condition/action set up to exit a long position, but since the long entry is carried through to the end of the testing period, it is automatically closed on the testing period end date and corresponding price. Can it be coded that the trade is never entered because it does not naturally get closed out based on the condition/action?
Hypothetical Example: Buy when 5 day ma crosses above 20 day. Sell position when 5 day ma crosses below 20 day. Attached is a snap shot on a single stock that shows multiple Exit's based on the sell set up in the conditions/actions, but the last trade is exited because it bumps into the end date of the testing period. Can this trade not be included in the summary statistics as it will skew results? Just trying to get "pure" results from conditions/actions to validate strategies worthiness (and no the 5/20 cross is not the real strategy I am working on).
Appreciate the help and guidance.
Comment