Bollinger Bands® Long Entry on Breakout Above Upper Band with ATR-Based Trailing Stop (Using Copy-and-Paste) (Point-and-Click NinjaTrader® Strategy)
Original Trading Strategy
In this video you will learn how to use copy-and-paste to add an ATR-based trailing stop that can be turned on and off to the “When Bar Updates” section of a point-and-click strategy for NinjaTrader® without code in Quagensia® N Edition. You will learn how to accomplish this quickly and easily with copy-and-paste, instead of by building out the ATR-based trailing stop’s logic piece by piece using point-and-click. You will also learn how to copy-and-paste an ATR-based stop loss or an ATR-based profit target into a strategy. We will start by making a copy of the point-and-click strategy for NinjaTrader® called Bollinger Bands® Long Entry on Breakout Above Upper Band that is built into Quagensia N Edition. Then we will add an ATR-based trailing stop that can be turned on and off to the “When Bar Updates” section of the copy of that strategy using copy-and-paste instead of point-and-click. By the end of the video, we will have re-created our own copy of the point-and-click strategy for NinjaTrader® called “Bollinger Bands® Long Entry on Breakout Above Upper Band with ATR-Based Trailing Stop” that is also built into Quagensia N Edition. We will also add an ATR-based profit target to this strategy using copy-and-paste to demonstrate an example of combining an ATR-based trailing stop and an ATR-based profit target in the same strategy using copy-and-paste instead of by building out the logic of the ATR-based trailing stop and the ATR-based profit target piece by piece using point-and-click.
Peer Reviews, Modifications & Responses
Thanks for Sharing!
Trading Strategy Summary
This trend following strategy goes long when the close price crosses above the upper band of a Bollinger Bands® indicator while the close price is going up and exits when the close price crosses below the middle band of a Bollinger Bands® indicator.
The strategy also exits its long position via a trailing stop at a specified number of 14-Day ATRs below the highest price achieved since entry of the position if this strategy’s “Use Trailing Stop?” input parameter is set to True due to its check box being checked in the NinjaTrader® user interface.
Please read the NinjaTrader® help documentation titled “SetTrailStop()” at the following URL to learn important details about using trailing stops in NinjaTrader® strategies:
https://ninjatrader.com/support/helpGuides/nt8/NT%20HelpGuide%20English.html?settrailstop.htm
Note that the help page linked to above states that “Trail stops are amended on a bar update basis, so dependent upon the Calculate setting of the parent strategy.” The “Calculate” field in this strategy’s “Strategy Details” section is set to “On Bar Close” so per the help page linked to above the trailing stop will only move up in price due to a new high price since entry of the position at the end of each bar’s price action, not on each tick or on each price change occurring during a bar’s formation.
Copyright © 2023 Quagensia, Inc. All rights reserved.
How to Get the Quagensia Strategies
This point-and-click trading strategy is built into Quagensia N Edition (for NinjaTrader®).
Customize Quagensia Strategies with Your Own Ideas
Tweaking Quagensia Trading Strategies using point-and-click with the Quagensia Desktop Application is easy for non-programmers. If you get stuck you can usually find the answer you need in our online help documentation or you can ask a question in our friendly Discord community.
If you don’t want to tweak a Quagensia Trading Strategy with point-and-click to add your own proprietary trading logic, you can still download a Quagensia Trading Strategy file, open it up in the Quagensia Desktop Application, and generate its code, then backtest and optimize the trading strategy on different instruments, different bar periods (weekly bars, daily bars, hourly bars, 15-minute bars, etc.), or different bar types (time-based bars, volume-based bars, tick-based bars, etc.), and use different start and end dates.
Some tweaks you can make to the Quagensia Trading Strategies you download include:
Modify the entry & exit logic.
- Add more conditions, remove conditions, or change them by choosing from among a very large number of components, including many exotic indicators.
- Add or modify stop losses, trailing stops, and profit targets. Make them tighter, less tight, or based on an entirely different calculation.
- Add or modify time stops. For example, exit after a certain number of bars either unconditionally or only if the post-entry price action did or did not exhibit certain characteristics.
Enhance the output of the strategy to go beyond simply placing orders.
- Draw lines, shapes, and text on the chart. For instance, you can mark times or prices where each entry or exit condition of a multi-condition entry or exit was true, even if all the necessary entry or exit conditions were not true at the same time so an entry or exit did not occur.
- Write information to NinjaTrader®’s NinjaScript® Output window or TradeStation®’s EasyLanguage® Print Log window.
- Write information to a file. You can even output a report that can be opened in Microsoft Excel or consumed by another application that reads comma-delimited, semicolon-delimited, or otherwise character-delimited tabular data files.


