Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Orders get canceled in the next bar after they were just placed.

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

    Orders get canceled in the next bar after they were just placed.

    I have one code, it do well in the back test. But when I run it life, orders get canceled in the next bar. That code line are:
    EnterLongStop(High[1]+0.15));
    EnterShortStop(Low[1]-0.15));
    Would you please tell me what I did wrong here? I use "CalculateOnBarClose = false;"
    Thanks

    #2
    Your orders need to be resubmitted at every bar in order to keep it alive. If your conditions do not stay true on the next bar you end up not resubmitting and then the order becomes cancelled. In NT6.5 there you can avoid this by setting a liveUntilCancelled bool to true.

    The syntax for this override is:
    EnterShortStop(int barsInProgressIndex, bool liveUntilCancelled, int quantity, double stopPrice, string signalName)
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks, but when we will have 6.5?

      Comment


        #4
        It's available as beta yet: http://www.ninjatrader-support.com/v...ead.php?t=5227

        Comment


          #5
          Thanks a lot. I can't wait to try it. I will let you know if I see any issue.
          Take care

          Comment


            #6
            Do you really mean High[1]+0.15, and not High[0]+0.15 ? The current price could be higher than High[1]+0.15, in which case NT would reject the stop order IIRC.

            Comment


              #7
              Pete, I had tried both, the result are the same. I had to resubmit every bar.
              I would like to try the 6.5, but I couldn't install it, the error says, "file corrupt or internet error". I had tried a fews times.
              Thanks

              Comment


                #8
                This is caused by the installer file being corrupted during download.

                To resolve:
                - Uninstall NT from Windows Control Center > Add/Remove Programs
                - Open up Internet Explorer and click Tools-> Internet Options->Delete->Delete files
                - now try the download again.

                If this doesn't work for you, please try a different browser such as Mozilla Firefox to download NinjaTrader. Please report back to us if you are unable to get the software installed and up and running. Do this by sending a note to support AT ninjatrader DOT com.
                JessicaNinjaTrader Customer Service

                Comment


                  #9
                  My comment had nothing to do about the order submission, I was talking about the logic in your strategy.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Shansen, 08-30-2019, 10:18 PM
                  24 responses
                  939 views
                  0 likes
                  Last Post spwizard  
                  Started by Max238, Today, 01:28 AM
                  0 responses
                  7 views
                  0 likes
                  Last Post Max238
                  by Max238
                   
                  Started by rocketman7, Today, 01:00 AM
                  0 responses
                  4 views
                  0 likes
                  Last Post rocketman7  
                  Started by wzgy0920, 04-20-2024, 06:09 PM
                  2 responses
                  28 views
                  0 likes
                  Last Post wzgy0920  
                  Started by wzgy0920, 02-22-2024, 01:11 AM
                  5 responses
                  33 views
                  0 likes
                  Last Post wzgy0920  
                  Working...
                  X