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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      63 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      35 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      54 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      61 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      48 views
      0 likes
      Last Post CarlTrading  
      Working...
      X