Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pop up window blocks trading logic

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

    Pop up window blocks trading logic

    Hello.
    In rare occasions when the price movement is fast enough I get pop up error window shown below when submitting entry stop market order or limit order. The problem is once that window appears over chart it seems the strategy stops trading activity and ignore any order operations. The only way is to restart the strategy... Is there a way to make the strategy keep trading logic?

    Click image for larger version

Name:	image.png
Views:	87
Size:	58.6 KB
ID:	1296418

    #2
    Hello PopovDS,

    The default action that strategies take when an order rejection occurs is to become disabled. If your strategy is not becoming disabled that may mean that by the order being rejected your other logic stops working because it did not have logic to handle the rejection, that should only be the case if you are using a RealtimeErrorHandling setting that is not the default.

    Comment


      #3
      The strategy does not get disabled. It keeps working but there is no any reaction to such methods as EntryLong, EntryLongLimit and so on...
      I use the following option:
      Code:
      RealtimeErrorHandling = RealtimeErrorHandling.IgnoreAllErrors;
      And the handle code (just logging):
      Code:
      protected override void OnOrderUpdate(Cbi.Order order, double limitPrice, double stopPrice,
                  int quantity, int filled, double averageFillPrice,
                  Cbi.OrderState orderState, DateTime time, Cbi.ErrorCode error, string comment)
      {
          if (order.OrderState == OrderState.Rejected)
          {
              if (_enableLog)
              {
                  _logger.Log(string.Format("Order time {0}: Order '{1}' has been rejected", order.Time, order.Name), CustomLogLevel.Warn);
              }
          }
      }​

      Comment


        #4
        Hello PopovDS,

        If you are using ignore all errors you would need to add debugging into OnOrderUpdate to verify that your handing the correct situations an also resetting any variables/logic in your script accordingly. Because you are choosing to handle the rejection that means you need to make sure your logic will continue to work after that event. The default action is to terminate the strategy so it has to be completely restarted, that is the only way the platform would be able to make sure the strategy will work normally after the rejection, it would have to recalculate and start over.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        89 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        135 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        68 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        119 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        69 views
        0 likes
        Last Post PaulMohn  
        Working...
        X