Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Positions

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

    Positions

    Hi,

    When I ask in a script for Position.Quantity I get the current position held by the current script strategy. Let's say I have two strategies attached to the same chart: Is there a way to get from any of the strategies the whole Position.Quantity of all attached scripts to that same chart ?

    Thanks

    #2
    Hello Agenor,

    Thank you for your note.

    This is correct. The Position will get the running instance of the strategies position.

    To get all the positions open you will need to query the account positions.
    Note that this is unsupported programming.

    Below is a sample on how to do this -
    http://www.ninjatrader.com/support/f...ad.php?t=55718

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Ok, thanks for that, but not exactly what need. I think that the solution will be to put all stragies in the same script...This code works only in real-time, so won't be possible to backtest it...

      Another question: Is there a way to know through script the current result $ of an account in the current session ? Also is it possible to know the current risk of an account ?

      Comment


        #4
        Agenor,

        The strategies performance can be found through TradeCollection and TradePerformance -
        TradeCollection
        TradePerformanceValues
        Cal H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        663 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        376 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        110 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        575 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        580 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X