Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simultaneously opening opposing positions

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

    Simultaneously opening opposing positions

    Hey there,

    is it (somehow) possible with Ninjatrader to have a long and a short position at the same time (and by that I don't mean having two "opposing" limit orders pending, but to actually and really have a long and a short position on the market)

    ... and within the same strategy (which is the, I suppose, the only sane way to deal with the interdependecies between the two)?

    It's quite clear that it won't work with the "managed" approach but I was hoping to get this done with the unmanaged approach. SubmitOrder() has four different order types so at first I was confident that there was a way to explicitly have NT do this.

    E.g.

    Code:
    [...]
    longEntry = SubmitOrder(0, OrderAction.Buy, ...);
    shortEntry = SubmitOrder(0, OrderAction.SellShort, ...);
    [...]
    goes both long and short and thus should be treated differently than

    Code:
    [...]
    longEntry = SubmitOrder(0, OrderAction.Buy, ...);
    shortEntry = SubmitOrder(0, OrderAction.Sell, ...);
    [...]
    At least when backtesting, it doesn't make a difference. Having such a code fragment in place, NT immediately goes flat again (result: Profit = Zero $$$)

    I'd appreciate any advice about this. Am I going about this the wrong way or is this (currently) not possible with NT?

    TIA!

    #2
    koschba,

    This is only possible if you open 2 accounts and trade a long order to one, and a short order to another.

    Please let me know if I may assist further.
    Adam P.NinjaTrader 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