BacktestLineBreak Bars


SiBacktestLineBreak is the first back testable Line Break bar for NinjaTrader. This unique charting style was invented in Japan, and introduced by NinjaTrader in version 7. The Line Break chart is one of the most effective ways to reduce chart noise.

In this image »

  • #1 Points out the missing wick data that is required for accurate back-testing. Price made a big move up that the SiBacktestLineBreak chart shows, but the traditional Line Break is missing.
  • #2 Shows how much the Open price has been modified. Using the true Open price is critical for accurate back-testing.

The traditional Three Line Break chart (shown below) generates a clean looking chart that is quite similar to a Renko chart. It generates an unpolluted visual aid, which is easy on the eyes and simple to follow. Unfortunately, the traditional Line Break chart gives incorrect back-test results, due to the modification of Open prices and the removal of bar wicks.

On the other hand, the SiBacktestLineBreak provides accurate back-testing results by showing the correct Open prices and restoring the wicks. Adding all of the necessary price data is the reason the SiBacktestLineBreak has such a unique look. For more, see the detailed explanation below the chart.

Furthermore, the SiBacktestLineBreak has the ability to correct volume issues with the NinjaTrader LineBreak. For example, the volume for NinjaTrader LineBreak bars are incorrect when the Base period type is set to Tick, Second, Day, Week, or Month. With the SiBacktestLineBreak, this is no longer a concern. Click to see an example.


Using the BTLineBreak in NinjaScript

This example illustrates how to add a BacktestRenko Bars to your NinjaScript.  It will add a BacktestRenko B:5 T:2 R:10 Backtest Mode:On  bar.

  • Value is the ‘Line Breaks’ parameter.
  • BaseBarsPeriodType is the ‘Base period type’ parameter (e.g. Minte, Tick, Volume).
  • BaseBarsPeriodValue is the ‘Base period value’ parameter (Period of the underlying chart type).

Please note, SharkIndicators does not provide coding support.  For further NinjaScript help please contact NinjaTrader support.  Thank you.

// NinjaTrader 8
else if (State == State.Configure)
	AddDataSeries(new BarsPeriod() { BarsPeriodType = (BarsPeriodType)20123, Value = 3, BaseBarsPeriodType = BarsPeriodType.Minute, BaseBarsPeriodValue = 1 });

Example File

This example indicator can be found in the SharkIndicators folder > Examples > SiBTLineBreakSMAExample.  It demonstrates how to add the BTLineBreak as a secondary data series to your NinjaScript.
Download the import file below and import it into NinjaTrader using Tools » Import » NinjaScript Add-On.
Download import file for NT 8 (.zip)