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

Freezing

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

    Freezing

    Hi
    I have some code that changes a target order.
    It works fine 50% of the time ( in simulated data feed).
    Then the chart freezes and I have to use Task Manager to exit and re log in - whereupon the original orders are still there.

    The order is accepted and gets all the way to working in the queue so I have no idea what error is causing this - can anyone provide some insight?

    Its an unmanaged strategy and I am checking that the order is != null before I submit the change.

    This is the end of the log/trace file below.
    As you can see it kindly informs me there is noError


    2024-01-25 14:31:38:316|1|32|Order='d8c6530abbeb49d2bc90ee753 6c9b870/Sim101' Name='MyTarget' New state='Change submitted' Instrument='MES 03-24' Action='Sell' Limit price=4924.75 Stop price=0 Quantity=27 Type='Limit' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2024-01-25 14:31:38:425|1|32|Order='d8c6530abbeb49d2bc90ee753 6c9b870/Sim101' Name='MyTarget' New state='Accepted' Instrument='MES 03-24' Action='Sell' Limit price=4924.75 Stop price=0 Quantity=27 Type='Limit' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
    2024-01-25 14:31:38:426|1|32|Order='d8c6530abbeb49d2bc90ee753 6c9b870/Sim101' Name='MyTarget' New state='Working' Instrument='MES 03-24' Action='Sell' Limit price=4924.75 Stop price=0 Quantity=27 Type='Limit' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''​

    #2
    Hello Mindset,

    Thank you for your post.

    When the chart freezes, are you able to click anywhere else in the platform, like the Control Center for example?
    I would like to review your diagnostic files. You can send them via support email by going to the Control Center-> Help-> Email Support. Ensuring 'Log and Trace Files' is checked will include these files. This is checked by default.​ Please include "ATTN Emily" in the subject line along with a link to this forum thread in the body of the email before clicking send.

    I look forward to assisting you further.
    Emily C.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by Mindset View Post
      Hi
      As you can see it kindly informs me there is noError
      Unfortunately, the "correctness" of "Error='No error' Native error=''​ is not guaranteed. For a number of brokers I use, those remain steadfastly "No Error!" even for REJECTED orders!

      In the specific cases I've discovered and provided copious detail to NinjaTrader about, it requires NinjaTrader to "enhance" the relevant adapters to understand and react appropriately ... ... but that does not seem to be a priority for the development team, or management. Most disappointing. That may or may not apply in your situation, but be aware of the possibility.

      Thanks.
      Multi-Dimensional Managed Trading
      jeronymite
      NinjaTrader Ecosystem Vendor - Mizpah Software

      Comment


        #4
        Hi Emily

        Thanks for your reply. I find everytime I post an issue about an hour later I discover the solution!

        I found my error. I had an ATR[10] with only 3 bars on the chart. I am confused however as to why it didn't give me a simple out of index warning?
        In answer to your query; I could click anywhere outside my chart but nothing would work - I could discconnect, remove the strategy ( but it stayed on the chart), try to load another workspace( failed) and even X in the control panel but it wouldn't shut down.
        Do strategies work differently from indicators I wonder?

        jeronymite thanks for the input. Yes it is frustrating to have no trace error. In my case I just go right back to basics and build up the code again.It's exceptionally time consuming. I am nearing the end of my journey I think as this current order entry system seems to finally do what I want it to do!

        Comment


          #5
          Originally posted by Mindset View Post
          Yes it is frustrating to have no trace error. In my case I just go right back to basics and build up the code again. It's exceptionally time consuming. I am nearing the end of my journey I think as this current order entry system seems to finally do what I want it to do!
          I hear you Mindset! My AddOn has taken some ten years (through NT7 and NT8) to reach its current state (127K+ lines and counting). It's been worth the journey, but sometimes I've felt the battle for common sense and the technical hurdles of the platform itself that tend to be (deliberately?) ignored by NinjaTrader have extended the development cycle by a significant amount.

          In the case of the broker adapters, there's been a neglect of important aspects like the example I gave that has meant I have had to "jump through hoops" and "intuit" various order error and failure conditions, rather then being able to go to what should, within the existing design, be readily detectable. A further ridiculous example is that some of the errors not flagged to OnOrderUpdate and OnExecutionUpdate are actually subsequently logged in the log file! Go figure!

          With continuing (and exciting) development plans that go out a few years, I suppose I can look forward to more rigmarole to go through.

          Anyway, keep on keeping on. Glad you're making progress.

          Thanks.
          Multi-Dimensional Managed Trading
          jeronymite
          NinjaTrader Ecosystem Vendor - Mizpah Software

          Comment


            #6
            Oh wow. 127K lines. I am not worthy. My size is a paltry 5k lol.
            However I am not a coder and sometimes the concepts behind C# and then NInjascript just lose me.
            As you say the dev cycle is thus extended.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Balage0922, Today, 07:38 AM
            0 responses
            3 views
            0 likes
            Last Post Balage0922  
            Started by JoMoon2024, Today, 06:56 AM
            0 responses
            6 views
            0 likes
            Last Post JoMoon2024  
            Started by Haiasi, 04-25-2024, 06:53 PM
            2 responses
            19 views
            0 likes
            Last Post Massinisa  
            Started by Creamers, Today, 05:32 AM
            0 responses
            6 views
            0 likes
            Last Post Creamers  
            Started by Segwin, 05-07-2018, 02:15 PM
            12 responses
            1,786 views
            0 likes
            Last Post Leafcutter  
            Working...
            X