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 jaybedreamin, Today, 05:56 PM
                  0 responses
                  2 views
                  0 likes
                  Last Post jaybedreamin  
                  Started by DJ888, 04-16-2024, 06:09 PM
                  6 responses
                  18 views
                  0 likes
                  Last Post DJ888
                  by DJ888
                   
                  Started by Jon17, Today, 04:33 PM
                  0 responses
                  1 view
                  0 likes
                  Last Post Jon17
                  by Jon17
                   
                  Started by Javierw.ok, Today, 04:12 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post Javierw.ok  
                  Started by timmbbo, Today, 08:59 AM
                  2 responses
                  10 views
                  0 likes
                  Last Post bltdavid  
                  Working...
                  X