• 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

NT8 Strategy Error "The OCO ID 'xxxxx' cannot be reused. Please use new OCO ID."

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

    NT8 Strategy Error "The OCO ID 'xxxxx' cannot be reused. Please use new OCO ID."

    Hello Support,

    The strategy submits Market Orders using OCO for Profit Target and Stoploss. The strategy uses Managed Approach with SetProfitTarget and SetStoploss methods.

    I've never had to care about the OCO ID of any Strategy generated order ?

    What can I code into the strategy that will ensure a Unique OCO ID ?

    Thank you

    #2
    Hello rayko,

    Thanks for your post.

    What version of NT8 are you using? (Look under Help>About)

    Is this a strategy builder strategy or a Ninjascript based strategy?

    Does this occur on every order or occasionally?

    Please post a simplified version of your strategy that demonstrates the issue so we may test.

    Alternatively, please write into PlatformSupport[at]NinjaTradaer[dot]Com, mark the e-mail Atten: Paul and include a link to this thread.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      The Version is 8.0.17.1.

      The strategy started out as builder strategy that I later released so I could customize it.

      The error occurs occasionally.

      I'll try to create something for you, however it would really help if you could tell me what NT8 is using to derive the OCO ID.

      Is it OrderName and is there a limit on the string length ?

      For example for OCO ID to be unique the ordername must be less than 30 characters and cannot include $#%& (special charactors) or something.... (I'm just spit balling as to why...)

      Please let me know.

      Comment


        #4
        Hello rayco,

        Thanks for your reply.

        For example of OCO ids, you can check the "Orders" tab of the control center under the OCO column. (If no information you can place a couple of orders in SIM101 with an ATM to see what is generated).

        I do not know what the string length limit is and will inquire further.

        I would not use special characters but I have no information advising that specifically and have not tested this.

        A colleague has advised you could use System.Guid.NewGuid() to generate a unique OCO-ID string


        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Atilla, Today, 04:05 PM
        0 responses
        9 views
        0 likes
        Last Post Atilla
        by Atilla
         
        Started by Displacer, Today, 02:57 PM
        2 responses
        13 views
        0 likes
        Last Post Displacer  
        Started by SAILIKITY, 05-22-2019, 05:41 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by rmillar, 01-09-2019, 06:02 PM
        6 responses
        71 views
        1 like
        Last Post eDanny
        by eDanny
         
        Started by mlarocco, Today, 11:39 AM
        4 responses
        23 views
        0 likes
        Last Post mlarocco  
        Working...
        X