Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategies ability to see Control-Center_Strategies_Acct.position=True or False?

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

    Strategies ability to see Control-Center_Strategies_Acct.position=True or False?

    Hello,

    I want the Strategies (more than 1 per instrument) I have been running to be able to see if Control-Center; Strategies Tab, Acct.position: is True, or False. If the Strategy is in Sync I will allow it to trade if not I will have the Strategy Stop until sync equals True.
    Is there a bit of code that I can reference in my Strategy to see if it is Sync True or False? For instance if I have a Print function, it’s output would either be true .or. false.

    Best regards,
    Geoffrey B.
    Last edited by GTBrooks; 02-24-2019, 09:11 PM.

    #2
    Hello Geoffrey,

    Thank you for your note.

    You can compare the strategy Position with the PositionAccount. If they are not the same MarketPosition and Quantity then they are not in sync.

    Below are links to the help guide.

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I have tried calling Account Positioning comparison to Strategy Position, and even when the Account holds a position it Prints 0. i am able to call Strategy position just fine, it prints the correct Strategy Position. I am using the same method to call both Strategy, & Account Position.
      Is there a particular way to get NinjaTrader to print Account Position, for the instrument the Strategy is trading on?

      the work around is appreciated, BUT I read that you can call any Control Center columns. If what I read is true there is a Programatic way to call and see if the Strategy is in Sync or not.
      Last edited by GTBrooks; 02-25-2019, 08:20 AM.

      Comment


        #4
        Hello GTBrooks,

        Can you provide a link to the help guide that states you can call any Control Center columns? I am not aware this is possible.

        Some properties are available such as account items listed in the AccountItems page in the help guide. You can also loop through the orders and executions of an account through the addon approach.
        However, the Strategies listed on the strategies tab, and the items in the Log are not available to NinjaScript.

        I'm not aware of any property that says if a strategy is sync with the account internal in NinjaScript Strategies. This information is provided, however, with the Position and PositionAccount objects.

        Below is a link to a video that demonstrates the PositionAccount is accurate.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thank you; for the Google dock, I saved it onto my drive. I am using that bit of code in the place of the SYNC logic I had in place and the Strategies are no longer stepping on each other’s feet. Great solution.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          59 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          134 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          75 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          45 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          50 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X