• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error Message Entry-Limit-OCO

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

    Error Message Entry-Limit-OCO

    Hello,

    for not missing entries I do for short-entries a limit at the bid (and not anymore at the ask) and for long-trades a limit at the ask (instead of the bid).

    Today after closing a trade there appeared the 2 attached messages. I do not understand what caused this, when logic works then it has to work always, no?

    And I do not understand why in the message is "buy-stop".... in the code I have limit for short and long. What might have caused the error so that I can try to avoid this.

    Thank you!
    Tony
    Attached Files
    Last edited by tonynt; 09-03-2019, 12:32 AM.

    #2
    Hello tonynt,

    Thanks for your post.

    The stop order is being rejected as its price is incorrect (according to the message you see). When the stop order is rejected then that is contributing to the OCO error so you need to fix the stop order price value and ensure it is correct for the current price.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      thank you for your reply. When having short and long entrystopmarketorders is there to add something in the code for having both working? When condition for buystopmarket is true the order is working but the sellstopmarketorder is not placed when conditions for sellstopmarketorder is true. Same when the condition for the sellstopmarketorders is true and the order is working then the buystopmarket is not placed when condition for buystopmarket is true. Seems form the script can only be one direction be working. What has to be added please for having both?

      Thank you!
      Tony

      Comment


        #4
        Hello,

        thank you for your reply. When working with stopmarketorders I want to ask if there is something to add in the code so that it works ok because in my script it does the sellstopmarketorder when condition is true but then it does not place the buystopmarketorder when its conditions are true and vv. What has to be added to a script stragegy so that both orders can be placed from the script when conditions are true please.

        Thank you!
        Tony

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by StevenNelson, Today, 03:05 PM
        0 responses
        9 views
        0 likes
        Last Post StevenNelson  
        Started by Benjaminf, Today, 02:21 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Kate  
        Started by grayfrog, 05-24-2020, 09:29 PM
        5 responses
        32 views
        0 likes
        Last Post NinjaTrader_RyanS  
        Started by chrismcdermut, Today, 01:46 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Kate  
        Started by dpolyakov, Today, 01:13 PM
        3 responses
        15 views
        0 likes
        Last Post dpolyakov  
        Working...
        X