Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cancel Pending order

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

    Cancel Pending order

    Hello team,


    below code is for Enter long position

    if ((Close[0] > Open[0]) )
    EnterLong(Convert.ToInt32(LOT), @"Long");

    below this code will exit Long posiotion
    if (Position.MarketPosition == MarketPosition.Long)
    ExitLong(Convert.ToInt32(LOT), @"Long");

    But i was looking for how i can cancel long position order which is pending not executed

    Thank You​




    #2
    Hello siddhugaddi,

    A market order should not remain in pending, that is executed at the current market price. The pending state may be due to a conflict in your logic, do you have any other order methods in your logic? Can you otherwise provide more detail about which connection/account was used to submit the order?

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    43 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    30 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    48 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    38 views
    0 likes
    Last Post CarlTrading  
    Working...
    X