Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stumped by error message

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

    Stumped by error message

    I get the following error message in the Log:
    A SellShort stop order placed at '6/7/2007 11:02:00 AM' has been ignored since the stop price is greater than close price of the current bar. This is an inva

    I bring up the data box and scroll to 6/07/2007 11:02:00 AM. the OHLC are 843.3/843.4/842.4/842.4.

    Since that did not make any sense to me I added a Print() to show the Limit, Stop and Close price. Here is the code:
    // Condition set 2
    if (RunStrategy == 1
    && NTKPPowerPops(false, false, 8, false, 18, 9, true, 3, false).KPPowerPops[0] == -1)
    {
    Print(Time[0].ToString() + " Limit: " + Low[0] + " Stop: " + Low[0] + " Close: " + Close[0]);
    EnterShortStopLimit(DefaultQuantity, Low[0], Low[0], "Entry Short");
    }

    The Output window shows:
    06/7/2007 11:02:0 AM Limit: 842.4 Stop: 842.4 Close 842.4

    To my way of thinking, the Stop Price is = to the Close, not greater.

    I get a similar message when using EnterLongStopLimit() and the High and close of the bar are equal.

    #2
    We will change the error text to say that it is >= to the close price...
    RayNinjaTrader Customer Service

    Comment


      #3
      So it's impossible to Short StopLimit on the Low[0] and Long StopLimit on the High[0] because one never knows when the Low = Close or High = Close because of your = check of Stop price with the Close. This seems artificial to me as in real life one can do this.

      Comment


        #4
        In real life, one can not submit a buy stop at a price <= current close. It will get rejected.

        To reduce the chance that you do not get a rejected order in real-time and historical:

        EnterLongStop(Close[0] == High[0] ? High[0] + TickSize : High[0]);
        RayNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        574 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        333 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
        553 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X