Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy error - invalid error price

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

    Strategy error - invalid error price

    Hello,

    I Tested my strategy in historical data and I got the following error

    "**NT** A Buy order placed at '16/12/2013 16:51:00' has been ignored since the stop price is less than or equal to the close price of the current bar. This is an invalid order and subsequent orders may also be ignored. Please fix your strategy."

    The order that cause this error :

    EnterLongStopLimit(0,true,100,Close[0] + 2 * TickSize ,Close[0],"");

    why I got this error?

    Sincerely, Kobi

    #2
    Hello,

    Thank you for your note.

    A stop limit order must have the stop price placed above the current market price.
    (Try placing a stop limit order at or below market price on the SuperDOM, this will cause an error message as well)

    Currently you are placing your stop price at the close price.

    EnterLongStopLimit(0,true,100,Close[0] + 2 * TickSize ,Close[0],"");
    EnterLongStopLimit(int quantity, double limitPrice, double stopPrice, string signalName)
    http://www.ninjatrader.com/support/h...gstoplimit.htm

    If you would like to enter the market immediately, submit a market order with EnterLong().
    http://www.ninjatrader.com/support/h.../enterlong.htm

    Otherwise, add at least one tick to the close price. (I would even suggest to use GetCurrentAsk() + TickSize).
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    558 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    545 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X