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

NT8 is multi-threaded, but is it ever multi-process?

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

    NT8 is multi-threaded, but is it ever multi-process?

    Hello,

    My goal is to read and write data to the same text file from many NT8 strategies running in many concurrent optimizations and many strategies running concurrently on many charts in real-time.

    I realize that inside of a single instance of NT8, both strategy optimizations as well as real-time strategy execution on charts run on multiple threads, so it is important to make my code that writes to the text file thread-safe.

    If a single instance of NT8 runs under a single process (with many threads) and never spawns other processes, I could just use the easy to use and highly performant ReaderWriterLockSlim class ( https://docs.microsoft.com/en-us/dot...ew=netcore-3.1 ) but if a single instance of NT8 spawns other processes I would have to use the much less performant Mutex class ( https://docs.microsoft.com/en-us/dot...ew=netcore-3.1 ) to ensure that the text file is read from and written to in not only a thread-safe manner but also a process-safe manner.

    So my question is:

    NT8 is definitely multi-threaded, but is it ever multi-process? I.e. could multiple strategies running concurrently in multiple Strategy Analyzer optimizations and running on multiple charts in real-time ever be running in any process other than the one under which NinjaTrader.exe executes?

    Thanks in advance!

    EquityTrader

    #2
    Originally posted by EquityTrader View Post
    NT8 is definitely multi-threaded, but is it ever multi-process? I.e. could multiple strategies running concurrently in multiple Strategy Analyzer optimizations and running on multiple charts in real-time ever be running in any process other than the one under which NinjaTrader.exe executes?
    No, there can only be one NinjaTrader.exe process per machine.

    Comment


      #3
      Hello EquityTrader,

      Thanks for your question.

      We have confirmed with others in the office. Under almost all cases that from a user perspective, the environment is single process. There can be cases where an adapter takes another process, but this would not be relevant for regular use or scripting with the platform.

      We look forward to assisting.
      Last edited by NinjaTrader_Jim; 05-13-2020, 07:25 AM.
      JimNinjaTrader Customer Service

      Comment


        #4
        Thank you very much for your help, NinjaTrader_Jim and bltdavid. This is great news.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by usazencort, Today, 01:16 AM
        0 responses
        1 view
        0 likes
        Last Post usazencort  
        Started by kaywai, 09-01-2023, 08:44 PM
        5 responses
        603 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by xiinteractive, 04-09-2024, 08:08 AM
        6 responses
        23 views
        0 likes
        Last Post xiinteractive  
        Started by Pattontje, Yesterday, 02:10 PM
        2 responses
        22 views
        0 likes
        Last Post Pattontje  
        Started by flybuzz, 04-21-2024, 04:07 PM
        17 responses
        230 views
        0 likes
        Last Post TradingLoss  
        Working...
        X