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

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 alifarahani, Today, 09:40 AM
    4 responses
    20 views
    0 likes
    Last Post alifarahani  
    Started by gentlebenthebear, Today, 01:30 AM
    3 responses
    16 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by PhillT, Today, 02:16 PM
    2 responses
    7 views
    0 likes
    Last Post PhillT
    by PhillT
     
    Started by Kaledus, Today, 01:29 PM
    3 responses
    11 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by frankthearm, Yesterday, 09:08 AM
    14 responses
    47 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Working...
    X