Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

multiple positions on the same instrument

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

    multiple positions on the same instrument

    Hi,

    If I have a strategy that run long position and concurrently short position (Two positions)
    so when I using the position object how can I know to which position it refers to.

    Sincerely,Kobi

    #2
    Hello Kobi,

    Thank you for your note

    You would need to create your own position tracking in the strategy. The reason for this is because there is only one position object per instrument. If you go both short and long the strategy will see this as flat, hence you will need to track this yourself in the logic.

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

    Comment


      #3
      Hello Cal,

      Thank you for your response,

      Is there any code example for this?

      Thanks, Kobi

      Comment


        #4
        Kobi,

        There is not. You would need to develop and test this yourself.
        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
        576 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        334 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        553 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X