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

{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
    Paul H.NinjaTrader Customer Service

    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.


        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by brianfnoel, Today, 01:24 AM
        0 responses
        4 views
        0 likes
        Last Post brianfnoel  
        Started by bill2023, Yesterday, 08:21 AM
        2 responses
        14 views
        0 likes
        Last Post bill2023  
        Started by ynoldsany, Today, 01:00 AM
        0 responses
        3 views
        0 likes
        Last Post ynoldsany  
        Started by Carolscogginsi, Yesterday, 10:45 PM
        0 responses
        7 views
        0 likes
        Last Post Carolscogginsi  
        Started by RaddiFX, Yesterday, 10:15 AM
        2 responses
        15 views
        0 likes
        Last Post RaddiFX
        by RaddiFX
         
        Working...
        X