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 charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    57 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    143 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    161 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    97 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    276 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X