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 Haiasi, 04-25-2024, 06:53 PM
        2 responses
        16 views
        0 likes
        Last Post Massinisa  
        Started by Creamers, Today, 05:32 AM
        0 responses
        4 views
        0 likes
        Last Post Creamers  
        Started by Segwin, 05-07-2018, 02:15 PM
        12 responses
        1,785 views
        0 likes
        Last Post Leafcutter  
        Started by poplagelu, Today, 05:00 AM
        0 responses
        3 views
        0 likes
        Last Post poplagelu  
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,407 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Working...
        X