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 kinfxhk, 07-14-2026, 09:39 AM
    0 responses
    12 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 10:18 AM
    0 responses
    59 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 09:50 AM
    0 responses
    41 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 07:21 AM
    0 responses
    47 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-11-2026, 02:11 AM
    0 responses
    38 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X