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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        80 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        40 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        63 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        63 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        54 views
        0 likes
        Last Post CarlTrading  
        Working...
        X