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 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