Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Viewing total positions taken

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

    Viewing total positions taken

    I build short term positions across multiple instruments with sometimes up to 20 contracts and stagger entries/exits. I want a quick way I can view the total cumulative positions taken during the trading day (not trades as these are simply contracts). Is there a way to put that onto my chart as an indicator? Is there any code that I can draw from to do that?

    #2
    mrre1, thanks for your post.

    How is this different from the count of the SystemPerformance.AllTrades.Count value? Currently there is not a supported way to retrieve historical executions from the database, so the count needs to begin from the first trade made in real time.

    I look forward to hearing form you.

    Comment


      #3
      I want to keep track of total positions taken (could also be both long and short separately and that would actually be preferred) as I leg in and out of positions. The reports are tied to "trades" which is contracts not positions. The chart trade view in Trade Performance and Data Series > Plot executions makes it cumbersome to track it that way. When I am flat the position would reset.

      Although I haven't used SystemPerformance.AllTrades.Count it seems like this would not be what I am trying to do if I am taking both long and short positions in a trading day.

      For example, in one day I may take 3 long positions with 40-60 staggered contracts and 5 short positions with 100 staggered contracts. In this example what I would love to be able to quickly see is the 3 and the 5 numbers.
      Last edited by mrre1; 04-12-2020, 06:32 PM.

      Comment


        #4
        He mrree1, thanks for your reply.

        The strategy itself would need to keep a tally of the positions taken over time. The OnPositionUpate method is called every time the strategy goes from flat to short/long and back to flat again, so this will let you keep track of positions taken from the start of the strategy. This can be as simple as two integer variables, longCount and shortCount, and you increment those as the strategy goes from flat to long or flat to short.

        Please let me know if I can assist any further.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        585 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        340 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        554 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        552 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X