Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 entrystopmar****rders is there to add something in the code for having both working? When condition for buystopmarket is true the order is working but the sellstopmar****rder is not placed when conditions for sellstopmar****rder is true. Same when the condition for the sellstopmar****rders 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 stopmar****rders 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 sellstopmar****rder when condition is true but then it does not place the buystopmar****rder 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 inanazsocial, Today, 01:15 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by rocketman7, Today, 02:12 AM
        0 responses
        10 views
        0 likes
        Last Post rocketman7  
        Started by dustydbayer, Today, 01:59 AM
        0 responses
        1 view
        0 likes
        Last Post dustydbayer  
        Started by trilliantrader, 04-18-2024, 08:16 AM
        5 responses
        23 views
        0 likes
        Last Post trilliantrader  
        Started by Davidtowleii, Today, 12:15 AM
        0 responses
        3 views
        0 likes
        Last Post Davidtowleii  
        Working...
        X