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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    93 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    138 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    123 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    73 views
    0 likes
    Last Post PaulMohn  
    Working...
    X