• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.
    https://ninjatrader.com/support/foru...596#post806596

    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.
        https://ninjatrader.com/support/foru...269#post802269
        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 itrader46, Today, 02:59 PM
          3 responses
          7 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by madams212121, Today, 12:10 PM
          13 responses
          27 views
          0 likes
          Last Post NinjaTrader_Jim  
          Started by jvanelli, Today, 12:19 PM
          1 response
          20 views
          0 likes
          Last Post NinjaTrader_BrendanC  
          Started by raaxus, Today, 11:17 AM
          3 responses
          21 views
          0 likes
          Last Post NinjaTrader_ChrisL  
          Started by login_dejavu, Today, 02:22 AM
          1 response
          17 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X