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:	77
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 NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        54 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        131 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
        44 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