Backtesting in TOS - Look-ahead Bias?

T

TraderKevin

Member
In my strategy I have 2 separate buy/sell to close order pairs that are set to trigger on slightly different profit-taking conditions. While examining backtesting results, I noticed they weren't always triggering as intended. As a test, I simplified the code so that the profit taking orders both had only 1 trigger, and that was to buy/sell when their price target was hit. I set one of the targets at $4 and the other at $2. If I put the $4 order above the $2 order, when backtesting it seems to always trigger the higher $4 target if it was able to hit it, and the $2 target if it couldn't quite reach $4 but did hit $2.

If I'm right, then this throws all my backtesting results out the window for strategies with multiple profit taking orders. Anyone know if this is the case, and if so, if there's a way around it?
 

Similar threads

Top