BacktestRenko Bars
The only Renko with a Backtest Mode
Using the BacktestRenko in NinjaScript
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. }
There is no example file available.