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

Each Strategy trading their own positions

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

    Each Strategy trading their own positions

    Could I please have quick reference on how to make sure that each strategy (on the same instrument) does trade their own position.

    Sync False would be enough?

    thanks again.

    mp

    #2
    Hello,

    Thank you for the question.

    In general, there is not a specific suggestion on how you would develop multiple strategies that run on the same instrument, most commonly it is suggested to instead combine the logic into a single script. A single script is aware of all positions it places and could delegate logic accordingly. You can also set the single script to place multiple entries in the same direction if needed or utilize other timeframes and instruments. You can, however, use some of the newer features of NinjaScript to observe the account position or perform syncing actions on multiple strategies.

    As strategies are unaware of what the others are doing, you can perform manual sync options like the following link describes: https://ninjatrader.com/support/help...eAllStrategies

    You can also create a script that utilizes the PositionAccount object rather than Position, again this is not directly what the other strategies positions are but is instead the direct account position: https://ninjatrader.com/support/help...ionaccount.htm

    You can utilize the addon framework for its Account object subscriptions as well to observe an account in more detail if needed: https://ninjatrader.com/support/help...ount_class.htm

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      just to be sure...I do not want the strategy to look at the account position but only to the trades done by the single strategy in question. ie: one taking a very long term view and another strategy trading on a different time frame and shorter Profit/Stop loss targets.
      Last edited by percma; 12-14-2017, 09:28 AM.

      Comment


        #4
        Hello,

        Thank you for the reply.

        Yes, there is no suggested way for two strategies to communicate, they are separated for a reason. The reason is so that each individual strategy has its own performance results. You can read about the separation of account and virtual position here: https://ninjatrader.com/support/help..._account_p.htm

        If you need to know what the other strategies position is specifically, I would suggest making the multiple strategies into a single multi-timeframe strategy. This will be a lot less complicated than trying to make sure multiple scripts are in sync while running them. Otherwise, you would need to observe the account position as the alternative. There is not a way I could suggest to make the strategies communicate their position in a synced way.

        Please let me know if I may be of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by gentlebenthebear, Today, 01:30 AM
        2 responses
        13 views
        0 likes
        Last Post gentlebenthebear  
        Started by Kaledus, Today, 01:29 PM
        2 responses
        8 views
        0 likes
        Last Post Kaledus
        by Kaledus
         
        Started by frankthearm, Yesterday, 09:08 AM
        13 responses
        46 views
        0 likes
        Last Post frankthearm  
        Started by PaulMohn, Today, 12:36 PM
        2 responses
        16 views
        0 likes
        Last Post PaulMohn  
        Started by Conceptzx, 10-11-2022, 06:38 AM
        2 responses
        56 views
        0 likes
        Last Post PhillT
        by PhillT
         
        Working...
        X