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

Ninjatrader logic explanation desired (lag issue, though not the normal one!)

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

    Ninjatrader logic explanation desired (lag issue, though not the normal one!)

    Hi,

    As I have no visibility into what happens internally in NT8 during this, I would appreciate some feedback from the developers / programmers, as to the work around. Thanks.

    I have an indicator (not strategy) that submits orders. It does this with the following code (example, but cut and paste from my code)

    Code:
                                        ordername = "Entry";
                                    myOrder = myAccount.CreateOrder(myInstrument,OrderAction.Buy,OrderType.Limit,OrderEntry.Manual,TimeInForce.Gtc,1,convertedPrice-(TickSize*ordernum),0,"",ordername,Core.Globals.MaxDate,null);
                                        NinjaTrader.NinjaScript.AtmStrategy.StartAtmStrategy(ATM, myOrder);
    Now, this works perfectly well. Has done for a year or more. I noticed a while back though, one problem. On the FIRST only iteration, it works perfectly, but ninjatrader starts to stutter and lag. Chart crosshairs cannot keep up, orders struggle to move, etc. Ninja 8 appears to be doing something (I know not what) on that first call and it's overwhelming the rest of NT. This lasts for maybe 10 seconds, depending on volatility, then all is OK. Subsequent calls to the same code via the same operation (hotkey) work instantly and the issue does not re-occur. Almost as if whatever it was doing (going through database, etc), has either been cached, or is not being called any more. NT will be like this every time on the FIRST ORDER ONLY and it is 100% reproducible, so there is something going on. Problem is, I need your input as to what that might be in order to resolve, given I have no visibility into what NT8 is actually doing. If you are able to pose the question to developers and shed any light on this, I would appreciate it.

    Thanks.

    #2
    Hi pjsmith, thanks for your post.

    I have attached a similar script in an attempt to reproduce the issue on my end. Could you run this sample on your PC and let me know if you get the same performance issues? If you do we can try resetting your database to see if the lag is coming from something like a very large database.

    I look forward to hearing from you.
    Attached Files
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      many thanks. I will test this over the weekend and update this thread. I will need to keep my database info, regardless (it is around 60mb now), but I will try resetting it if I can re-reproduce the issue. Update you shortly. Thanks again.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by TradeSaber, Today, 07:18 AM
      0 responses
      4 views
      0 likes
      Last Post TradeSaber  
      Started by PaulMohn, Today, 05:00 AM
      0 responses
      9 views
      0 likes
      Last Post PaulMohn  
      Started by ZenCortexAuCost, Today, 04:24 AM
      0 responses
      6 views
      0 likes
      Last Post ZenCortexAuCost  
      Started by ZenCortexAuCost, Today, 04:22 AM
      0 responses
      3 views
      0 likes
      Last Post ZenCortexAuCost  
      Started by SantoshXX, Today, 03:09 AM
      0 responses
      17 views
      0 likes
      Last Post SantoshXX  
      Working...
      X