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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        59 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        143 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
        283 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X