Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

long & short simultaneously

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

    long & short simultaneously

    I have read on some threads it is possible to have long and short positions open simultaneously using the unmanaged approach.

    I have tried with this:

    Code:
    [SIZE="2"]if (entryLong == null) 
    entryLong = SubmitOrder(0, OrderAction.Buy, OrderType.Limit, 1, Med0 - UnitP, 0, "", "C1");
    				
    if (entryShort == null) 
    entryShort = SubmitOrder(0, OrderAction.SellShort, OrderType.Limit, 1, Med0 + UnitP, 0, "", "V1");		[/SIZE]
    Once I get filled, either short or long, as soon as the opposite order gets filled I get flat!

    I thought you had to use BuytoCover or Sell to get flat. What am I doing wrong?

    Regards
    Lalocom

    #2
    Lalocom, it is not possible to be both long and short for the same instrument. If you buy a contract and then sell a contract, the net position is 0 (flat).

    With unmanaged, it is possible to have two opposing orders (long and short) open at the same time, which is not true for the managed approach.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Ninja support can help u with this using 2 Doms and differently named strategies within the same instrument.

      Comment


        #4
        Hi Rick, can you please clarify what you're trying to do here?
        AustinNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        672 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        379 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        111 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        577 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        582 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X