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 charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    57 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
    276 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X