I do mostly swing trading, and have been backtesting strategies without any problems, but now I've reached a point where I'm not sure how to proceed. The strategy I currently want to test exits upon hitting a profit target, which my previous strategies have not. In addition, as is often the case, there is a stop loss exit.
My question is how do you go about doing a backtest of something like that? The problem I have is that if I use daily bars, I could easily have a situation where both the PT and the stop loss are hit, within the same bar. How do I figure out which one gets hit first?
The only solution I can think of is to use shorter bars, like hourly. Since this is a futures strategy, that means 24 bars/trading day, which is a lot of bars if you want to go back a bunch of years.
I assume that is the standard way to proceed, or is there some obvious alternative that I'm missing here?
My question is how do you go about doing a backtest of something like that? The problem I have is that if I use daily bars, I could easily have a situation where both the PT and the stop loss are hit, within the same bar. How do I figure out which one gets hit first?
The only solution I can think of is to use shorter bars, like hourly. Since this is a futures strategy, that means 24 bars/trading day, which is a lot of bars if you want to go back a bunch of years.
I assume that is the standard way to proceed, or is there some obvious alternative that I'm missing here?
