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

ExitLongLimit issue.

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

    #31
    It should be filled though.

    Bertrand,
    I understand, but the point I am trying to make is that it should get filled at my limit price. Case and point: RIMM (1/7/09) - At 11:25 AM

    The condition for Entry is True - yet it doesn't get filled.

    Comment


      #32
      There is no fill guarantee if you place a limit order, as this will depend on the realtime price queque at your level. The condition for entry might be true and the order placed correctly, but you still can be left behind if placing limit orders...every order type has tradeoffs.

      For a test, go ahead and try using market orders in your system to see the difference. Thanks!
      BertrandNinjaTrader Customer Service

      Comment


        #33
        No Guarantee?

        "There is no fill guarantee if you place a limit order, as this will depend on the realtime price queque at your level. The condition for entry might be true and the order placed correctly, but you still can be left behind if placing limit orders...every order type has tradeoffs."

        real time price queque?

        Do you mean that during backtest, NT keeps track of price que? Doesn't it require tick data to do this?

        In other words what you are saying is when an order is placed via EnterLongLimit and the price is there for it to get filled (in fact price moves down 1 or 2 cents) - sometimes it will get filled and sometimes it will not? This is exactly what's happening.

        I just closed NT and re-opened it and re-ran the same code and now it shows (executes and fills) the trade that it showed as Expired before.

        Am I chasing my tail here? How can same code produce one result once and another result the next time using same data?

        Although it is now showing some sell orders as being expired...
        but they are then filled a few bars later.

        I am really frustrated having spent more than 2 days debugging this and still not able to get to the bottom of this.

        I think it would be extremely helpful to add a real debugger to NT. Something like the PowerBuilder (by Sybase) debugger, which allowes you to step through code, placing stops whereever the trouble spots are, as it executes it line by line and see the value of each variable and any messages generated by the system or the user.

        Thanks

        Comment


          #34
          My reference was made when you trade this stratregy real time, the simulator tries to approximate this, so it is perfectly ok to get different limit order fill scenarios if you reload your strategy. Please also review this link here - http://www.ninjatrader-support.com/H...sBacktest.html

          You can also change the fill type under 'Historical Fill Processing' when you start your strategy. Please see this link for more info - http://www.ninjatrader-support.com/H...AStrategy.html

          Did you try to rewrite it with other order types?

          Here info on all order types available to you - http://www.ninjatrader-support2.com/...ead.php?t=3271
          BertrandNinjaTrader Customer Service

          Comment


            #35
            But I am talking about backtest only. All of my posts made it clear that I am backtesting.

            Can you please answer my questions from the previous post?

            Comment


              #36
              strategy1,

              Orders that are resubmitted are kept alive. When kept alive they can get filled any time. If you do not resubmit you do not keep it alive. When not kept alive the order is cancelled. When you see an order expired via TraceOrders it simply means you have not kept the order alive. There is no funny stuff going on here. If NT does not receive a resubmit, it cancels the order.

              Backtesting on the same data and parameters will never yield different results. If you are connected to your data provider when you backtest you are likely pulling a different data set from them as you rebacktest. Please disconnect first and just pull from your database.

              If you want a debugger you can link it up with Visual Studio. This is not supported beyond this link: http://www.ninjatrader-support.com/H...ualStudio.html
              If you wish to use it, you are on your own.
              Josh P.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by elirion, Today, 01:36 AM
              0 responses
              3 views
              0 likes
              Last Post elirion
              by elirion
               
              Started by gentlebenthebear, Today, 01:30 AM
              0 responses
              4 views
              0 likes
              Last Post gentlebenthebear  
              Started by samish18, Yesterday, 08:31 AM
              2 responses
              9 views
              0 likes
              Last Post elirion
              by elirion
               
              Started by Mestor, 03-10-2023, 01:50 AM
              16 responses
              391 views
              0 likes
              Last Post z.franck  
              Started by rtwave, 04-12-2024, 09:30 AM
              4 responses
              34 views
              0 likes
              Last Post rtwave
              by rtwave
               
              Working...
              X