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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    50 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    16 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    22 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    23 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X