Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OrderAction BuyToCover vs Buy in Unmanaged code

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

    OrderAction BuyToCover vs Buy in Unmanaged code

    Hi,

    What is the difference between OrderAction.BuyToCover and OrderAction.Buy in unmanaged code?

    Example:
    1. Position is Flat
    2. Submit Order OrderAction.Sell @ 1
    3. I am 1 contract short

    In order to reverse the position, what should I do?

    a) Submit Order OrderAction.Buy @ 2
    Or
    b) Submit Order OrderAction.BuyToCover @ 1 and then Submit Order OrderAction.Buy @ 1

    In other words, when do I have to use OrderAction.BuyToCover / OrderAction.SellShort?

    Thanks.

    #2
    Hello alex.nt,
    For futures it wouldnt matter what you use however in case of stocks, some connectivity provider (like TDA) specifically asks the order to be "tagged" to differentiate a short sell and buy to cover against a normal buy and sell.
    JoydeepNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    59 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
    283 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X