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 argusthome, Yesterday, 10:06 AM
        0 responses
        20 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        18 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        14 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        9 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        38 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X