Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to avoid order reject error

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

    How to avoid order reject error

    Hello.

    I use stop limit order in strategy builder. But I encounter order reject and strategy will be disabled.
    I have added condition to ensure current bid/ask is above stop order value to avoid the error.
    Is there any solution to avoid?
    Code:
     // Set 1
                if ((Open[1] < Close[1])
                     && (Close[1] >= POCofBar1[1])
                     && (GetCurrentBid(0) >= (POCofBar1[1] + (1 * TickSize)) ))
                {
                    Draw.Diamond(this, @"POCtest Diamond_1", false, 0, (POCofBar2[1] + (-1 * TickSize)) , Brushes.LightCoral);
                    EnterShortStopMarket(Convert.ToInt32(DefaultQuantity), (POCofBar1[1] + (-1 * TickSize)) , @"psell");
                }
                
                 // Set 2
                if ((Open[1] > Close[1])
                     && (Close[1] <= POCofBar1[1])
                     && (GetCurrentAsk(0) <= (POCofBar1[1] + (1 * TickSize)) ))
                {
                    Draw.Diamond(this, @"POCtest Diamond_1", true, 0, (POCofBar2[1] + (1 * TickSize)) , Brushes.LawnGreen);
                    EnterLongStopMarket(Convert.ToInt32(DefaultQuantity), (POCofBar1[1] + (1 * TickSize)) , @"pbuy");
                }
                ​
    Marble

    #2
    Hello Marble,

    Thank you for your post.

    If you would like your strategy to ignore order rejection errors, you can change your strategy's RealtimeErrorHandling setting.



    RealtimeErrorHandling.StopCancelCloseIgnoreRejects will perform default behavior on all errors, except rejections.

    Please let us know if you have any further questions.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    52 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    29 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    194 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    355 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    274 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X