Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order cancel question

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

    Order cancel question

    Hi guys,

    I want to ask if there is anything wrong in cancelling MIT orders(isLiveUntilCancelled=true) like that on OnBarUpdate?

    PHP Code:
    
    protected override void OnBarUpdate()
    {
          foreach(var order in Orders)
          {
                CancelOrder(order);
          }
    
         //some strategy logic here
    } 
    
    Last edited by login_dejavu; 01-15-2020, 02:16 PM.

    #2
    Hello login_dejavu,

    Thank you for your post.

    I don't see anything that would be an issue there other than "o" would need to be an Order variable with the corresponding order to cancel saved to it. You could replace that with order to cancel whatever order you've iterated to:

    Code:
                      foreach(var order in Orders)
                      {
                            CancelOrder(order);
                      }
    Please let us know if we may be of further assistance to you.

    Comment


      #3
      Yes, it was a typo, I meant "order" instead of "o". Thank you

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      56 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      133 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      73 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      45 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      49 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X