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

order filled one bar late

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

    order filled one bar late

    Hi

    i am using the wizard to programe a strat that uses the CCI indicator.

    it says
    second to last bar (2) >0
    last bar (1) > 0
    last bar (1) < 40
    current bar (0) > 80

    then open a long order

    it opens the order ok but on the strat analyser according to the chart it executes the order one bar after the conditions are met / showing on the CCI indicator.

    is there any reason for this delay?

    regards
    s

    #2
    That's how backtesting works: signal is triggered e.g. on bar 115 and orders are placed on bar 116.

    Comment


      #3
      Hi, thanks for the reply,

      so what price does it fill at

      so does it mean that if I had a strat that was to go long when price hit 100 and it price hit 100 at 9.00am, then the backtest would not fill until the next bar, say 9.03am when the close maybe 110, so it would fill at 110...?

      presumably in sim or live trading the order will execute asap after the signal...?

      Comment


        #4
        There is a wealth of info available in the docs on these issues. Please see e.g. here:

        Comment


          #5
          Thanks Dierk,

          had a quick squint at those links, yep, what i need to know should be in there.

          Comment


            #6
            Hi,

            I have digested the links and am running a strat on e-mini s&p 500 using the sim account.

            my first order took 6 minutes after the signal to fill? Is that right? Is that a true representation of how slow the market is to fill?

            when i have been manually responding to the signals it has filled in less than a mouseclick.

            Comment


              #7
              Not sure I follow.
              a) is this a backtest order? -> order is filled by logic mentioned below (=earliest on next bar)
              b) is this a live order on NT sim account? -> order is filled based on order type and limit/stop price
              c) is this a live order on broker live account? -> please contact your broker if you feel your order should have been filled earlier

              Comment


                #8
                b) running from a chart, I have a strategy placing orders. Data feed is zen-fire. I am trading my NT simulated account.

                p.s the order also filled at $50.00 higher than the close price on the bar where the signal appeared.

                Comment


                  #9
                  Then you should check the limit/stop price of your order on the orders grid in the control center.

                  Also: I suggest debugging your strategy as per here:

                  Comment


                    #10
                    thanks for this on-going support Dierk.

                    the limit/stop price was 0.

                    links look useful, but how do i execute/step through/run the code to make things appear in the output screen?

                    also I am getting delays on exiting positions.

                    my strat has signal to exit a long, then it waits a little while for a signal to go short - but the long had not been exited before the signal to go short, and no short order has been placed - is that because the exit long order was somehow blocking the go short order?

                    Comment


                      #11
                      - please proceed as per links below to get information in your output window
                      - CalculateOnBarClose might be of additional value for you: http://www.ninjatrader-support.com/H...BarClose1.html

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by ageeholdings, 05-01-2024, 05:22 AM
                      6 responses
                      42 views
                      0 likes
                      Last Post ageeholdings  
                      Started by tony_28217, Today, 07:04 PM
                      0 responses
                      11 views
                      0 likes
                      Last Post tony_28217  
                      Started by flybuzz, Today, 10:33 AM
                      1 response
                      9 views
                      0 likes
                      Last Post flybuzz
                      by flybuzz
                       
                      Started by spencerp92, 10-10-2023, 09:56 AM
                      4 responses
                      308 views
                      0 likes
                      Last Post flybuzz
                      by flybuzz
                       
                      Started by samish18, Yesterday, 10:13 AM
                      1 response
                      26 views
                      0 likes
                      Last Post NinjaTrader_Eduardo  
                      Working...
                      X