Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AutotrailStop

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

    AutotrailStop

    Just wondering if there is some rule with the AutoTrailStop?
    I have it running on a strat and was watching it on the dome. The Autotrail is set to 10ticksbehind. Often the price would move 3-5 ticks above the entry price, and yet the stop did not move. This was on the CL contract. It seemed quite jerky in its movement.
    Regards

    #2
    Are you talking about NinjaScript or ATM?
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Using Auto trail in a strategy script. Not refering to an ATM

      Comment


        #4
        Please post the code snippet of what you are using.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          protected override void Initialize()
          {
          SetTrailStop("", CalculationMode.Ticks, 10, false);

          CalculateOnBarClose = true;
          }

          Comment


            #6
            You may experience "jerky" because you simply can't amend an order that fast. For every tick price moves up you will have the trailing stop move up to. If the market is moving a bunch it may take some time for the trailing stop to "catch up", but it will move up to the correct value.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Ok. Just seemed not as smooth as an ATM set to the same setting.
              Regards

              Comment


                #8
                Also, I have never used strategies before. i noticed today, that if I started a strategy and the strategy deemed it was already in a trade it would enter straight away and often would not place a stop. Then the next trade would trigger and a stop would be placed. But I had an extra contract on the dome with no stop. Is there a method of starting a strategy so this does not happen? Or is it my programming?

                protected override void Initialize()
                {
                SetTrailStop("", CalculationMode.Ticks, 10, false);

                CalculateOnBarClose = true;
                }

                {
                EnterLong(DefaultQuantity, "");
                }

                Comment


                  #9
                  In Tools->Options->Strategies->NinjaScript select "Wait until flat".
                  Josh P.NinjaTrader Customer Service

                  Comment


                    #10
                    Thank you.
                    regards

                    Comment


                      #11
                      Is there a way that a combined value of losses causes the strategy to stop working? I am aware of the overall PNL and consecutive losers. But canit be made that if $300 is lost the strategy is stopped. This would enable a profitable day to stay profitable. Rather than allowing it to go to a negative loss.

                      Comment


                        #12
                        Yes, you can work closely this sample here for this - http://www.ninjatrader-support2.com/...ead.php?t=4084

                        As an idea you would need to store the highest daily profit achieved and then stop the strategy once 300$ is lost from this value.

                        Comment


                          #13
                          Thank you for your help

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                          0 responses
                          647 views
                          0 likes
                          Last Post Geovanny Suaza  
                          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                          0 responses
                          368 views
                          1 like
                          Last Post Geovanny Suaza  
                          Started by Mindset, 02-09-2026, 11:44 AM
                          0 responses
                          108 views
                          0 likes
                          Last Post Mindset
                          by Mindset
                           
                          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                          0 responses
                          571 views
                          1 like
                          Last Post Geovanny Suaza  
                          Started by RFrosty, 01-28-2026, 06:49 PM
                          0 responses
                          573 views
                          1 like
                          Last Post RFrosty
                          by RFrosty
                           
                          Working...
                          X