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