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 SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        46 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        22 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        14 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        20 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        22 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X