Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BuyToCover stop ignored

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

    BuyToCover stop ignored

    I am getting a stop order rejected with the following error.

    "A BuyToCover stop order placed at 'x' has been ignored since the stop price is less than or equal to the close price of the current bar."

    I don't understand this as this is the code I am using...

    Code:
     
    if (Close[0]<stopprice)
      ExitShortStop(stopprice);
    else
      ExitShort();

    #2
    I would enable "TraceOrders = true" in Initialize(), then inspect the Output window to get an idea when this is triggering and also print out the Close price on the offending bar. For sure your code would prevent this situation from happening, thus I would take the next step in seeing what is going on. If its still not clear, let us know.
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    612 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    355 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    561 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    564 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X