• 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

Automated Strategy generating error?

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

    Automated Strategy generating error?

    I have an automated strategy that is generating a couple of different errors, and I have no idea why.

    One of the errors is that it tries to reuse an OCO ID. I have zero clue on how to prevent this from happening, as all I'm setting in the strategy is the Stop Loss and the Profit targets. I'm unaware that I'm generating anything related to an OCO ID and of course the error doesn't occur every time, only randomly.

    Another error that was generated today was an attempt to modify an order with a price that had nothing to do with the order that was being generated. This might be OCO related but the log did not mention anything about an OCO error.


    I'm a little lost as I've written multiple strategies before and never once had this problem. The only difference this time is that it's a tick strategy. I am placing my stop loss 6 ticks back from the entry price, so I don't think it's an issue of incorrect stop placement.

    #2
    Hello chnh1,

    Thanks for opening the thread.

    Unmanaged Approach strategies will allow you to assign OCO ID's when Managed Approach strategies will use OCO ID's for the placement of the SetProfitTarget and SetStopLoss methods. If you are using the Managed Approach and the Set methods, there is likely an issue with the placement of those profit target and stop loss orders at that time.

    Could confirm if you are using an Unmanaged Approach strategy or a Managed Approach strategy?

    Could you also write in with your log and trace files so we can review this occurrence and provide further input?

    Please include the time at which this occurred so we can more easily analyze these files. You may follow the instructions below to attach your log and trace files to an email to platformsupport[at]ninjatrader[dot]com. (Please also include the text "ATTN Jim" and a link to the thread URL.)
    • Open your NinjaTrader folder under My Documents.
    • Right click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
    • Send the 2 compressed folders as attachments to this email.
    • Once complete, you can delete these compressed folders.


    Thanks in advance; I look forward to resolving this item.
    Last edited by NinjaTrader_Jim; 04-25-2018, 07:20 AM.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by reedstickets, Today, 07:53 PM
    0 responses
    3 views
    0 likes
    Last Post reedstickets  
    Started by Atilla, Today, 04:05 PM
    0 responses
    16 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
    75 views
    1 like
    Last Post eDanny
    by eDanny
     
    Working...
    X