Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Creating an ATR based stop and target using the strategy builder

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Creating an ATR based stop and target using the strategy builder

    Hi

    I've searched all through the forum & can see this questions asked a few times but I can't see a clear answer on how to do this sorry.

    Am I able to create an ATR based stop & profit target from within the strategy builder wizard or does this need to be created in the code?

    Thanks in advance

    #2
    Hello Gav_G,

    With the Strategy Builder, you would need to use Exit orders to set the price of an exit to an indicator..
    Below is a link to an example of controlling the prices of Exit orders.


    But I think you are wanting one more step which would be to do custom math. For example the current price minus the ATR price or something along those lines.
    For custom math, the script would need to be unlocked and coded by hand.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks Chelsea

      So sorry I've just posted another question which is really a follow on from this, feel free to delete the new thread if need be

      basically the targets & stops are being set to entry price when I use the below

      Code:
      // Long Entries
                  if (rules are met)
                  {
                      // Setting stops & targets
      
      
                      EnterLong(Convert.ToInt32(DefaultQuantity), @"Buy_1");
      
                      SetProfitTarget(@"Buy_1", CalculationMode.Ticks, ATR1[0]);
      
                      SetStopLoss(@"Buy_1", CalculationMode.Ticks, ATR1[0], false);
      ​​​​​​​What am I doing wrong?

      Comment


        #4
        Hello Gav_G,

        This strategy cannot be made with the strategy builder.

        Are you certain this strategy has not been unlocked and coded by hand?

        Below are links to unlocked examples. Please note, set methods need to be set or reset before placing an entry, not after.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thanks I've got it sorted now & yes I've unlocked this one now as you suggested

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Today, 05:17 AM
          0 responses
          44 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          124 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          65 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          42 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          46 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X