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!
The Issue With Large Timeframes
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!
The Solution
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:
Ensure that you have a strategy applied to the chart
Right-click, and choose “format strategy”. Then click on “properties”.
In the window that appears, you may select the LIBB resolution. We recommend that you set this to 1 minute, to get as accurate results as possible, without sacrificing too much performance.
Without LIBB vs 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!
Without LIBB
With LIBB
Ending Words
Do use the LIBB when you’re using stop or limit orders. Otherwise, you run the risk of fooling yourself with unrealistic backtest results!