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 guillembm, Today, 11:25 AM
        0 responses
        2 views
        0 likes
        Last Post guillembm  
        Started by Mongo, Today, 11:05 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Tim-c, Today, 10:58 AM
        1 response
        2 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by traderqz, Yesterday, 09:06 AM
        4 responses
        27 views
        0 likes
        Last Post traderqz  
        Started by traderqz, Today, 12:06 AM
        4 responses
        7 views
        0 likes
        Last Post traderqz  
        Working...
        X