Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

trailing stop

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

    trailing stop

    hello
    I add a trailing stop in the strategy wizard and it does not work.
    The profit targets and stop losses always work, but trailing stop soes not work.

    Have you heard of this ?

    thanks
    shane

    #2
    Originally posted by shanemcdonald View Post
    hello
    I add a trailing stop in the strategy wizard and it does not work.
    The profit targets and stop losses always work, but trailing stop soes not work.

    Have you heard of this ?

    thanks
    shane
    Will you please post your code of the trailing stop so that we can check it?

    Comment


      #3
      Originally posted by shanemcdonald View Post
      hello
      I add a trailing stop in the strategy wizard and it does not work.
      The profit targets and stop losses always work, but trailing stop soes not work.

      Have you heard of this ?

      thanks
      shane
      Is your strategy running CaclulateOnBarClose = true or false?

      If it is true, you will not see the auto-trail adjustment take place until after the bar closes.
      MatthewNinjaTrader Product Management

      Comment


        #4
        Originally posted by shanemcdonald View Post
        hello
        I add a trailing stop in the strategy wizard and it does not work.
        The profit targets and stop losses always work, but trailing stop soes not work.

        Have you heard of this ?

        thanks
        shane
        Are you using both SetStopLoss() and SetTrailStop() in the same strategy?

        Comment


          #5
          yes i am using both

          thanks
          shane

          Comment


            #6
            /// <summary>
            /// This method is used to configure the strategy and is called once before any strategy method is called.
            /// </summary>
            protected override void Initialize()
            {
            SetProfitTarget("", CalculationMode.Ticks, 50);
            SetStopLoss("", CalculationMode.Ticks, 15, false);
            SetTrailStop("", CalculationMode.Ticks, 15, false);

            CalculateOnBarClose = true;



            Do you use stop loss or do you not add stop loss with trailing stop ?

            thanks

            shane

            Comment


              #7
              Hello shanemcdonald,

              Thanks for that info.

              The SetTrailStop cannot be used with SetStopLoss for the same position. If both are called only the SetStopLoss will be set.

              This is mentioned in the tips section of SetTrailStop in the help guide language reference linked below.
              http://www.ninjatrader.com/support/h...ttrailstop.htm


              Please do not hesitate to contact us for any other NinjaTrader inquiries.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                hi
                thank you
                I missed that part when reading the guide.
                Will the trailing stop act as initial stop loss ?
                Or will there be no stop loss ?

                thanks
                shane

                Comment


                  #9
                  Hello shanemcdonald,

                  Yes, the trailing stop will be the initial stop loss.
                  Using your code as an example the stop loss will initially be set at 15 ticks.

                  Please do not hesitate to contact us for any other NinjaTrader inquiries you may have.
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    thank you for your help everyone

                    shane

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by DayTradingDEMON, Today, 09:28 AM
                    2 responses
                    15 views
                    0 likes
                    Last Post DayTradingDEMON  
                    Started by Stanfillirenfro, Today, 07:23 AM
                    6 responses
                    23 views
                    0 likes
                    Last Post Stanfillirenfro  
                    Started by navyguy06, Today, 09:28 AM
                    1 response
                    6 views
                    0 likes
                    Last Post NinjaTrader_Gaby  
                    Started by cmtjoancolmenero, Yesterday, 03:58 PM
                    8 responses
                    32 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Started by helpwanted, Today, 03:06 AM
                    2 responses
                    22 views
                    0 likes
                    Last Post NinjaTrader_LuisH  
                    Working...
                    X