Stop loss using condition tap

How can i set a stop loss using the action and condition tap not the stop and target tap, because i use ATR based traget and cannot use the stop loss and target tap i want a fix stop loss

1 Like

Hi @Adam_El,

I am sure another community member can give you better guidance regarding using the Strategy Builder that is built into NinjaTrader, but the no-code strategy called “Bollinger Bands® Long Entry on Breakout Above Upper Band with ATR-Based Profit Target” that is built into the newest version of the no-code strategy builder for NinjaTrader from Quagensia literally has this exact logic.

Here is a screenshot of this built-in strategy that you can clone from the left side of the app, and on the right you can see the ATR-based profit target logic that is built into this strategy, which you can make a copy of and create your own no-code strategy from:

Here is a screenshot that is more “zoomed out” that shows how this logic looks in the “When Bar Updates” section of the Quagensia N Edition:

Note these important aspects in the screenshot above:

  1. The “Set Profit Target (For Entire Position)” no-code function is in the “When Bar Updates” section, and is used before the “Enter Long Position Using A Market Order” no-code function so that the correct profit target settings are used to manage the position opened by the order submitted by the “Enter Long Position Using A Market Order” no-code function.
  2. Note how the “Calculation Value” parameter of the “Set Profit Target (For Entire Position)” no-code function is set to the product of 1) an optimizable input parameter named “Profit Target Nbr of 14-Period ATRs”, 2) the value of the 14-period ATR indicator which is defined in the Internal Variables section (not shown), 3) the Point Value of the instrument, and 4) the Default Order Quantity, which ends up being a decimal number value in units of “Currency”, like $500.
  3. Note how the “Set Profit Target (For Entire Position)” no-code function is only used if the optimizable “Use Profit Target?” Boolean (true or false) input parameter is set to True. NinjaTrader supports optimizing strategies on Booleans, not just numeric values in the Strategy Analyzer, so half of your optimization runs can be with an ATR-based profit target and the other half can be without an ATR-based profit target.

If you are interested in doing this with Quagensia N Edition, you can download it from the Quagensia website at https://www.quagensia.com/

Best regards,

Brook from Quagensia