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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    648 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    572 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    573 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X