Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Error Message for trailing stop loss

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

    Error Message for trailing stop loss

    price !

    I keep getting an error code when I use a trailing stop loss.

    I have a trailing stop loss set at 120 ticks.

    It works just fine when I am losing money and my trade is negative however when I start making money it typically cuts me out around 5 points with the error message.

    Strategy " " submitted an order that generated the following error "Unable to change order". Strategy has set cancel requests, attempted to close the position and terminated itself.

    Second error is:

    Cannot change order ' code' because current order values already match. Affected order Sell 1 Stop Market @ Price

    What is going on or what am I doing wrong?

    #2
    Hello litamm89,

    Thanks for your post.

    Are you testing with live data, historical data, or Playback with Market replay data?

    If historical data, are you testing in the Strategy analyzer?

    What is the Calculate setting of the strategy (Calculate.OnBarClose, Calculate.OnEachTick, or Calculate.OnPriceChange)

    Are you creating the strategy in the Strategy Builder or are you working directly in Ninjascript?


    Paul H.NinjaTrader Customer Service

    Comment


      #3
      NinjaTrader_PaulH

      I am testing with live money and live data.

      The sims dont seem to have the same problem but when I activate the exact same strategy on my real account it triggers the error messages.

      Calculate setting is as follows

      SetTrailStop("",CalculationMode.Ticks, 120, false);

      Comment


        #4
        Hello litamm89,

        Thanks for your reply.

        Are you using the Strategy Builder or are you working with the Ninjascript editor?

        What is the Calculate setting of the strategy (not of the trail stop), the options are: Calculate.OnBarClose, Calculate.OnEachTick, or Calculate.OnPriceChange?

        If you are using the Strategy Builder the Calculate setting of the strategy is selected on the "Default Properties" screen.

        If you are working with the Ninjascript editor, the Calculate setting is found under State.SetDefaults.

        Paul H.NinjaTrader Customer Service

        Comment


          #5
          NinjaTrader_PaulH

          I am using the strategy builder

          It is currently set to On each tick

          Comment


            #6
            Hello litamm89,

            Thanks for your reply.

            Please send us your log and trace files for review. Please do not post them here in the public forum.

            Send the log and trace files to PlatformSupport[at]NinjaTrader[dot]com. Mark the subject line Atten Paul, Ticket#3067441

            Please follow the steps below to manually attach your log and trace files to your e-mail.
            • Open your NinjaTrader folder under, "Documents" (sometimes called, "My Documents")
            • Right click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
            • Send the 2 compressed folders as attachments to your email.
            • Once complete, you can delete these compressed folders.
            Please include a link to this forum thread for reference.

            Please identify the name of the strategy and the date and time(s) where this occurred or as close as you can recall.
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Great I sent the email thank you

              Comment


                #8
                Hello litamm89,

                Thanks for your reply.

                I've sent you a couple of e-mails, if you have not received them please check your spam/junk e-mail folders.
                Paul H.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Spiderbird, Today, 12:15 PM
                2 responses
                10 views
                0 likes
                Last Post Spiderbird  
                Started by WHICKED, Today, 12:45 PM
                0 responses
                4 views
                0 likes
                Last Post WHICKED
                by WHICKED
                 
                Started by FrazMann, Today, 11:21 AM
                2 responses
                6 views
                0 likes
                Last Post NinjaTrader_ChristopherJ  
                Started by rjbtrade1, 11-30-2023, 04:38 PM
                2 responses
                80 views
                0 likes
                Last Post DavidHP
                by DavidHP
                 
                Started by lorem, Yesterday, 09:18 AM
                5 responses
                18 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Working...
                X