Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

multi strategy questions

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

    multi strategy questions

    A couple of questions on NT programming:

    1. If I want to do intra bar computation but don't want to do it tick by tick, I can do my own tick count say, only execute the onbarupdate every 20 ticks. But how can I tell if the tick is the last tick of the current bar?

    2. If I have multiple strategies running in a NT system, when a tick comes in, does the NT execute the onbarupdate (or any other event handling) in fixed sequence across all running strategies, or they're run in parallel/or non-deterministic way? If they're run in sequence, then how to control the sequence?

    3. Does NT support backtesting of a set of strategies?

    Thanks

    #2
    balancenv, thanks for the post.

    1. Correct, you could do your own count - you could tell via FirstTickOfBar, which will run in BarsInProgress context - with NT's event based framework, this open tick of the new bar is the closing tick of old, prior processed one, so what you would seek.

    2. We would not recommend relying on a specific event sequence, since NT is multi-threaded

    3. Unfortunately this would not be possible, you would need to combine different signals / strategies into one script to be able to backtest the combination of trading them together.

    Comment


      #3
      Follow up questions on event handling sequences:
      Assume I have three timeframes in a strategy, I know the execution of OnBarUpdate for each is in the order of its declaration in the code.
      Can we assume they will ALWAYS be executed in sequence so I don't have to worry about locking shared resources?

      In a broader context, can we assume, within the same/single strategy, all event handing will be process in sequence? Or, will NT invoke multiple threads to deal with OnExecution and OnBarUpdate in parallel?

      Let me repeat, within a single strategy, and I don't care about the execution sequence, just want to make sure there's no concurrent reader/writer of share resources.

      Comment


        #4
        balancenv, please see my reply in point 2 - we always advise to ensure custom code is thread safe.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, Yesterday, 10:06 AM
        0 responses
        22 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        19 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        14 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        10 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        41 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X