Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error message "...stop price is less than or equal to the close price..."

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

    Error message "...stop price is less than or equal to the close price..."

    Hi,
    I am getting this message "Strategy XXX has been ignored since the stop price is less than or equal to the close price of the current bar...." I found a few similar questions regarding this error message but I did not get from the replies what was wrong.

    The chart looks ok, and the order is correctly displayed.

    Any help?

    Thank you

    Petr

    #2
    This sounds like an order rejection message. CRITICAL — If your inquiry involves live orders, please always reach out to your broker's Orders Desk immediately to confirm and manage your live orders and positions.

    This will likely need to be resolved via email where we can access your NinjaTrader diagnostic files, but some basic information can be gathered here.
    • What version of NinjaTrader 8 are you using? Please provide the entire version number. This can be found under Help -> About (Example: 8.0.X.0)
    • Who are you connected to? This is displayed in green on lower left corner of the Control Center window.
    • I assume this occurred while trading. Were these simulated or live trades? If live, who is your broker?
    • What instrument were you trading?
    • Are you trading manually with an ATM strategy? Or is this an automated strategy placing orders on your behalf?
    • When did this most recently occur?
    • Other than the partial message you're quoting, do you receive an error on screen? Are there errors on the Log tab of the Control Center? If so, what do these errors report?

    Comment


      #3
      Hi Patrick,
      it was not live trading. The error occurred during my backtesting.

      - NT 8.0.15.1 64-bit
      - Using only free Kinetic EOD
      - simulated
      - tested on stocks - NASDAQ100 - I got the message for 82 of the list
      - N/A
      - it is happening when I run one of my strategies in Strategy Analyzer (testing multiple entries)
      - the message is actually from the log (see attached) - every row states the "date of the entry"

      Petr
      Attached Files

      Comment


        #4
        Hello Domek_69,

        Thank you for the post.

        In this case the error is fairly specific as to the reason for the ignored error, its stop price was either equal to or less than the current close making it invalid.

        Have you at this point tried adding any debugging to the script such as Prints to confirm the prices you are using are valid for the instrument being tested? I do see some prints but none relating to your prices.

        Running a script over many strategies will result in differences due to price variations between instruments. I also see you are using specific values like 0.1 which may result in very different values depending on the current instruments price.

        One example is:

        Price1 = (Close[0] + 0.1) ;


        This will take the close price of the instrument and add literally 0.1 to its current value. This may be a large amount on some instruments or this may be a very small amount on others.

        For this question, I would likely suggest that you limit the test to a single instrument that currently does not work, and then add prints to identify the prices being used in contrast to the current bars close price.

        for example:

        Code:
        Print("Price1 " + Price1 + " Close" + Close[0]);
        Using this information you could see if the calculated price is equal to or less than the current close to confirm the error.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Hello Jesse,
          You were right- debugging using the print function helped and I realized my code actually does what the error message says - it attempts to execute an stop order when the stop price is actually lower than close price. This happens when the price grow rapidly during few bars and the prices for my multiple entries are too close too each other. I added an condition to check this and the error message is gone, but I need to rethink the whole logic to make sure it does what I want.


          Thank you


          Petr

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by DJ888, 04-16-2024, 06:09 PM
          4 responses
          12 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by terofs, Today, 04:18 PM
          0 responses
          7 views
          0 likes
          Last Post terofs
          by terofs
           
          Started by nandhumca, Today, 03:41 PM
          0 responses
          6 views
          0 likes
          Last Post nandhumca  
          Started by The_Sec, Today, 03:37 PM
          0 responses
          3 views
          0 likes
          Last Post The_Sec
          by The_Sec
           
          Started by GwFutures1988, Today, 02:48 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_Clayton  
          Working...
          X