Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

order cancelled

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

    order cancelled

    Hello,

    I observe some of my orders are cancelled.and being replaced by a new position.
    I don't know why because I make sure that postition.quantity=0 (means there is not any current trade executing) before taking a new position. Here's my code :

    if(count_higher_high>=2 && current_trend=="bearish" && Position.Quantity==0)

    {
    EnterLongStopLimit(High[1]+ticksize,High[1]+ticksize,@"long_seb");
    }

    Any suggestions?
    Thanks,
    gotham

    #2
    Hello gotham,

    I would recommend printing the time of the bar and all values used in the conditions that place orders.

    Enable TraceOrders, and print the order object in OnOrderUpdate().

    Below is a link to a forum post that demonstrates.


    Save the output to a text file and I will be happy to assist with analyzing the output.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    428 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    279 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    241 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    327 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    290 views
    0 likes
    Last Post CarlTrading  
    Working...
    X