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

2 strategies on 1 account, will there be a conflict?

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

    2 strategies on 1 account, will there be a conflict?

    Hello~
    I am using Strategy Builder to make 2 scripts, that I would like to run on 1 account at the same time.
    1 script will be for 1 minute time frame, the other script will be for 3 minute time frame, on the same instrument. So they are 2 separate scripts, but enabled at the same time on 1 account.
    Can I enable both scripts at the same time? And, will it be possible for NinjaTrader to know if it is in a trade already, so it does not place another one until the first trade is done?
    I have this code in both of the scripts, will this work for making sure that if one script is in a trade, that the other script won't take a trade at the same time? Please let me know if there is another code I need to accomplish this.
    Click image for larger version

Name:	image.png
Views:	20
Size:	3.5 KB
ID:	1301837
    Please pardon my English, it is not my first language. Thank you for help.

    #2
    Hello betsuni_123,

    Thank you for your post.

    Running multiple NinjaScript strategies on the same instrument and account could cause the strategies to interfere with each other.

    You would need to run each strategy on a separate account if you want to run them on the same instrument to prevent them from interfering with each other.

    Please see this forum thread discussing this topic: https://forum.ninjatrader.com/forum/...660#post792660

    Strategies are only aware of their own market position (and therefore unaware of other strategies), so checking if MarketPosition is flat in this way would not prevent the strategy from taking further trades if another strategy is in a trade. This is will only check if that specific strategy's market position is flat.

    Please let us know if you have any further questions.
    Gaby V.NinjaTrader Customer Service

    Comment


      #3
      Hi Gaby,

      Thank you for the reply.
      Is what I am asking to do possible in another way?

      Comment


        #4
        Hello betsuni_123,

        You could create AddOn script that places orders directly to the account and checks the position of the account before placing further orders.







        Please note that this would require manual coding and would not be possible through the Strategy Builder.

        If you have any further questions, please let us know.
        Gaby V.NinjaTrader Customer Service

        Comment


          #5
          Thank you so much for your help, Gaby.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by marco231, Today, 11:32 PM
          1 response
          2 views
          0 likes
          Last Post marco231  
          Started by sofortune, Today, 10:55 PM
          0 responses
          2 views
          0 likes
          Last Post sofortune  
          Started by sofortune, Today, 10:19 PM
          0 responses
          9 views
          0 likes
          Last Post sofortune  
          Started by sofortune, Today, 10:10 PM
          0 responses
          6 views
          0 likes
          Last Post sofortune  
          Started by sofortune, Today, 09:49 PM
          0 responses
          4 views
          0 likes
          Last Post sofortune  
          Working...
          X