Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Reverse a position with 1 order

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

    Reverse a position with 1 order

    Hello,

    at the moment I´m using EnterLong() and EnterShort() in my code and when a position completely changes from long to short without being flat then NT creates 2 sell orders, 1 for exitlong and 1 for entershort.

    Is it possible to let NT automatically generate a sell oder of 2 lots for reversing a position or do I have to handle this by my own in the code?

    Thanks a lot

    Joerg

    #2
    Joerg,

    No, this is not possible. You need to explicitly close the long and then explicitly open a short.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Hi Josh,

      does NT check if the exitOrder is filled or is it just necessary to have it generated / or transmitted?

      Is there a Mar****rder-Function in NT which does´nt refer to entry or exit?

      Thanks a lot.

      Joerg

      Comment


        #4
        Not sure what you mean. When you go EnterLong() then EnterShort() after you have a long position it will exit the long and then enter you short. This is all automated for you.

        If all you wanted to do was exit the long you can use ExitLong().
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Yes, I see. The problem (or it´s more just an disadvantage) is that IB charges a minimum fee for each trade in FX and when I trade with small size (which I´d like to do at the beginning) it would be cheaper to reverse a position within just 1 transmitted order.

          Comment


            #6
            There are rules that require one order to be marked as Sell and another as SellShort.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            85 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            48 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            29 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            32 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            67 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X