LIBB, which stands for “look inside bar backtesting” is an essential feature that we can use to avoid unrealistic backtest results.
Let’s look at why this is!
When we use longer bar settings, such as daily bars, together with order types that may be executed as a bar is forming, we could face serious issues with determining which order that was activated first!
For instance, if you have set profit target and have a stop loss placed nearby, there is a chance that both are hit during the same bar. In that case, Easylanguage won’t know if the stoploss or profit target was activated first.
The way Easylanguage deals with this is that it assumes that the profit target was hit first. This will produce overly optimistic results that may make a losing strategy look tradable!
Fortunately, we can use LIBB to get rid of this issue!
LIBB simply looks at a shorter timeframe to determine which price moves that came first. That way we may tell which level that was hit first, and avoid getting inaccurate backtest results.
Here is how you activate LIBB:
Below we have set up a trading strategy with a tight stop loss and profit target. As you see, in some special cases the impact can be massive!
Do use the LIBB when you’re using stop or limit orders. Otherwise, you run the risk of fooling yourself with unrealistic backtest results!