Keltner Strategy sample

You could just make copies of any NinjaScript strategy that uses Bollinger Bands and make tiny changes, since both indicators have an upper, lower, and middle line, and are used in the same ways. If a trading methodology uses Bollinger Bands, none of the trading logic, technical analysis concepts, or quantitative analysis concepts change in any meaningful way.

If you are open to using a third-party no-code strategy builder, the one from Quagensia has quite a few Bollinger Bands-based strategies for NinjaTrader built in, some of which are shown in the screenshot below. To create a Keltner channel strategy out of any of the Bollinger Bands strategies, just click one of the strategies on the left side of the app and select the “Create New Strategy From Copy of This Strategy” context menu item, scroll down to the “Internal Variables” section and switch out the Bollinger Bands indicator with a Keltner Channel indicator as shown in the screenshot below, and then scroll down to the “When Bar Updates” section and make sure that the proper Keltner Channel plots (upper, middle, or lower) are being used in the no-code trading logic. Once you’ve converted a Bollinger Bands strategy into a Keltner Channel strategy, click the appropriate button at the bottom of the app to send the plain text NinjaScript strategy code file to NinjaTrader, where you can use it just like you would use any other NinjaScript strategy that you might normally manually code.

1 Like