Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cancelled order

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

    Cancelled order

    Hi all,

    I'm wrestiling with order logic: I wrote an easy system wich exits multiple positions, orders seem to be placed and executed fine, but controc center->orders shows a redundant "cancelled". I really do not understand what can cause that.

    Below a piece of the code:

    Code:
    if (Position.MarketPosition != MarketPosition.Flat)
    
    if (Position.MarketPosition == MarketPosition.Long){
    
    if (Position.Quantity == ctr)
    
    {
    
    
    
    ExitLongLimit(ctr/3, (Position.AvgPrice + target1), "1st Exit", "");
    
    ExitLongStop(ctr, (Position.AvgPrice - stop), "1stStop", "");
    And attached a snapshot of the contro center.

    The problem is that second "buytocover" limit orders which appears after the same order has been filled.

    Thanks in advance for your help,

    regards

    Marce
    Attached Files

    #2
    imported post

    I can't tell what or what not your strategy should be doing from the information provided. When trade is entered, are thereredundant live orders placed? If not, when does that order come live and cancel? Although the Control Center Log tab can be difficult to read, you can review it to see the sequence of how and what orders placed live to gain an understanding what may be happening.

    Ray
    RayNinjaTrader Customer Service

    Comment


      #3
      imported post

      Thanks Ray, tomorrow I'll have a look, but something is not working fine, I need to debug and debug...and this is a very simple and easy code made to understand logic.:?

      p.s. When I apply the strategy, past orders are placed fine and fine appears execution, qhile running on live data...something doesn't work.

      thanks

      Marce

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      571 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      330 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      549 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      549 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X