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 CaptainJack, 05-29-2026, 05:09 AM
        0 responses
        388 views
        0 likes
        Last Post CaptainJack  
        Started by CaptainJack, 05-29-2026, 12:02 AM
        0 responses
        260 views
        0 likes
        Last Post CaptainJack  
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        218 views
        1 like
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        302 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        268 views
        0 likes
        Last Post CarlTrading  
        Working...
        X