Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

{Ninjascript} NT8 - comunication between 2 ninjascript strategies

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

    {Ninjascript} NT8 - comunication between 2 ninjascript strategies

    Hello,
    It is possible to comunicate between 2 strategies? like ask for some variable value in another strategy?
    Thank you

    #2
    Hello fscabrera03,

    Thanks for your post.

    Communications between strategies was not something that was designed in as they are intended to run independently.

    That said, you can create shared methods. Please see this example by my colleague Chelsea here: https://ninjatrader.com/support/foru...est#post733956

    Comment


      #3
      Ok, lets think that I have 2 different scripts, first one open longs and the second open shorts.
      If both are using the same account, should be work?
      I still dont have any reponse about the way to have 2 playback accounts simultaniously

      Comment


        #4
        Hello fscabrera03,

        Thanks for your reply.

        "I have 2 different scripts, first one open longs and the second open shorts. If both are using the same account, should be work?" On the same instrument and same account, you can only have one account position. Both strategies run independent of each other and will maintain their virtual positions however if one strategy places orders while the other strategy is in a position, the position could either be closed or added to from an account perspective. We do not recommend running two strategies on the same instrument with the same account. We would advise opening a second/sub-account that would allow you to then run the two strategies independently of each other.

        There is only one playback account, you cannot have two.


        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        48 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        126 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        66 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        42 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        46 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X