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 NullPointStrategies, Today, 05:17 AM
    0 responses
    51 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    128 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    69 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X