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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        60 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        147 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        161 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        97 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        284 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X