BacktestRenko Bars

The only Renko with a Backtest Mode


Summary

BacktestRenko is the first multipurpose hybrid Renko bar.  This distinctive tool accomplishes multiple tasks in one package.  In other words, the SiBacktestRenko is two bar types in one.

In this image   »

  • #1 Backtest Mode Off.  This creates a smooth wave like action.  Phantom/fake bars will be created if necessary to fill gaps.
  • #2 Backtest Mode On.  This mode reveals the true Open price of the bar for more acturate back-testing results.  And, no phantom/fake bars.  Only true trade data is used.
  • #3 Short bars, like this with no tail, indicates a strong move in price. Trending information you will miss when using other Renkos.

True Price Data  &  True Volume

With Backtest Mode = On (big image above in the middle), an even higher level of accurate back-testing is accomplished.
True Price Data:  In this mode the SiBacktestRenko exclusively utilizes and displays only true trade data for the Open, High, Low, & Close of each bar.  Even price gaps are accurately portrayed, which is yet another first of its kind.  The original Renko bar was designed to smooth out price movement, but it sacrifices accurate back-testing.  When using this mode, the SiBacktestRenko will only show you price data where true trading occurred.  Simply put, it is the most accurate Renko on the market for back-testing.
True Volume:  The SiBacktestRenko corrects a volume issue that all other hybrid-renko bars have.
#5 (left) Illustrates the issue with other hybrid-renko bars.  Why should trades at higher prices be included in a down bar?
#4 (big image above) shows this issue is corrected with the SiBacktestRenko.

Backtest Mode = Off (big image above) generates the standard median Renko style that has become a favorite among day traders.  Its magnetism and popularity is due to the smooth wave-like look that it embellishes the chart with.  Finally, a chart style that is easy on the eyes and simple to follow!




Data Series » Properties

Brick size:  The term Brick refers to the bar's body (open to close, not wicks).  The open price is offset by this value from the closing price as determined by the Backtest Mode.
When Backtest Mode is Off, this sets the renko's body size.  The open price is offset by this value from the closing price, so that the brick/body sizes are all uniform which generates the smooth looking Renko style.
When Backtest Mode is On, only true trade data is used for the open & close of the bar, therefore Brick size is not used in this mode.

New Trending Bar:  This sets the number of ticks price must move in the trending direction to close a new bar.  For bars closing in the same direction, this is the offset value in ticks from the previous bar's close to the next bar's closing price.

Reversal size:  This sets the number of ticks price must equal or exceed for a reversal bar to form.

Backtest Mode:  When On, only true trade data is used for the open & close of the bar.  Use this mode for backtesting.
When Off, this mode generates the smooth looking Renko style, where the Open price is modified.  Also, phantom bars will be created if necessary to fill gaps.
Both modes can be used for live trading.  The choice is only a visual preference for live trading.

Tick Replay
NinjaTrader does not allow Tick Replay to be used with renko style bars.  However, this BacktestRenko can be used with Tick Replay only when Backtest Mode is On.  Tick Replay is allowed, because only true price data is shown.  This is only available with version 8.1.16.x or newer.


Webinar Recording


This webinar was from the NinjaTrader 7 days.


Buy Now - Only $295

Using the BacktestRenko in NinjaScript


Please note, this information is provided for professional programmers only.  SharkIndicators does not provide coding support.  For further help or assistance with issues, please contact a NinjaScript  programmer or NinjaTrader support.  Thank you.

NinjaTrader 8

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 'Brick Size' parameter.
  • BaseBarsPeriodValue is the 'New Trend Bar' parameter.
  • Value2 is the 'Reversal Size' parameter.
  • PointAndFigurePriceType sets the 'Backtest Mode' parameter.  PointAndFigurePriceType.HighsAndLows is ON. 
    PointAndFigurePriceType.Close is OFF.

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)20122, Value = 5, BaseBarsPeriodValue = 2, Value2 = 10, PointAndFigurePriceType = PointAndFigurePriceType.HighsAndLows });
}

Example File

This example indicator can be found in the SharkIndicators folder > Examples > SiBacktestRenkoSMAExample.  It demonstrates how to add the BacktestRenko 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)



NinjaTrader 7

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 'Brick Size' parameter.
  • BaseBarsPeriodValue is the 'New Trend Bar' parameter.
  • Value2 is the 'Reversal Size' parameter.
  • PointAndFigurePriceType sets the 'Backtest Mode' parameter.  PointAndFigurePriceType.HighsAndLows is ON. 
    PointAndFigurePriceType.Close is OFF.

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

{
    Add(Instrument.FullName, PeriodType.Custom9, 4, MarketDataType.Last);
                                          // See Note for Custom9
                                          // 4 sets the Brick size value.
    BarsPeriods[1].BasePeriodValue = 1;   // .BasePeriodValue sets the New Trend Bar value.

}
NOTE:   By default the SiBacktestRenko is assigned to PeriodType.Custom9.  If you moved this bar to a different PeriodType., look inside …\Documents\NinjaTrader 7\Config.xml  file to find which PeriodType it was moved to.


There is no example file available.