Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Process Thread Still Running

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

    Process Thread Still Running

    In performing a backtest with Strategy Analyzer on a minute scale I made a change to the strategy which caused it to log too much information to an external file. In computing a year of minute data it usually only takes around 6-7 minutes to complete with my original code which is very understandable as it computes and creates a 10 meg file. However, after a recent change and backtest I watched as the log file was increasing in size very slowly so I inspected the code while it was still running, found my issue, corrected it and recompiled. Since we can't stop a backtest in the middle of an instrument's test I opted to simply exit out of NinjaTrader 7. I clicked File then Exit. All of the windows closed out as normal however I noticed the log file was still slowing increasing in size. After looking at the Processes running NinjaTrader was still showing. After the process thread was finished NT disappeared from the Process Manager's list.

    (Side Note: When backtesting depending on the count of instruments or while downloading historical data you can press Abort in the main window however any fully downloaded historical instruments will complete their backtest despite the abort button but not a big issue. Any further backtests will be aborted though.)

    My question / concern is about any other instances of multi-threading where if for some reason something went wrong market wise or code wise while running a strategy say 50 concurrent times and I needed to shut it down immediately might any of those threads remain running like this backtest thread did?

    If no then what is different between running the strategy analyzer in multithread versus several strategies running on multithreads? The concern being a possibility that I close NT yet in the background something is still running and trading.

    If yes can you give any examples?

    Thanks in advance,

    #2
    Hello antrux,

    Thank you for your post.

    Any hanging process would need to be ended. There is no guarantee that a hanging process would not process code designed and ran on that thread. If the application is not exiting properly when specific code is ran you would look to that specific code for debugging.

    If the NinjaTrader application is shut down there should be no items from it's library that can be called or properly executed. NinjaScript strategies would still require interface with the underlying code of the application and live executions would require the brokerage technology to interface. A hanging thread, while unlikely to process executions, is still of concern and you would look to the items ran that caused the hanging thread.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by gentlebenthebear, Today, 01:30 AM
    2 responses
    13 views
    0 likes
    Last Post gentlebenthebear  
    Started by Kaledus, Today, 01:29 PM
    2 responses
    7 views
    0 likes
    Last Post Kaledus
    by Kaledus
     
    Started by frankthearm, Yesterday, 09:08 AM
    13 responses
    45 views
    0 likes
    Last Post frankthearm  
    Started by PaulMohn, Today, 12:36 PM
    2 responses
    16 views
    0 likes
    Last Post PaulMohn  
    Started by Conceptzx, 10-11-2022, 06:38 AM
    2 responses
    56 views
    0 likes
    Last Post PhillT
    by PhillT
     
    Working...
    X