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

OnExecutionUpdate Problems

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

    OnExecutionUpdate Problems

    Hi,
    I have come across an occasionally recurring problem in OnExecutionUpdate, where it seems to get stuck with a position of 1 contract when I dont' have any position. Then further executions are off, with the Position being reported incorrectly, and IsEntry being triggered when it's actually an exit, etc..

    Perhaps I don't understand what it's doing, but the behavior isn't consistent and doesn't make sense to me. Normally it behaves as expected. But when this happens, the only remedy I have found is to reset the Database.

    Please see the attached image of output from OnExecutionUpdate for an example.I've commented on it as I thought necessary.
    Attached Files

    #2
    Hello palinuro,

    Thanks for opening the thread.

    I would like to look into this further with you. Could you provide answers to the following questions so we can better understand this issue?
    • Can this be reproduced on a clean installation without any custom AddOns? Testing in a clean installation without AddOns will rule out an installation issue, and any "black box" issues that we can't track from custom AddOns.
    • Though you report this issue is occasional, can it be consistently reproduced by enabling your strategy with some specific steps?
    • If it can be consistently reproduced on a clean installation, could you provide a reduced version of the strategy and some steps we can take to hit the issue on our end?
    • If this is observed through an indicator that subscribes to Account ExecutionUpdate events, could you provide steps for us to hit this issue?


    I'll include some instructions for testing in a clean environment:
    1. Close NinjaTrader 8, and rename the "NinjaTrader 8" folder in My Documents to something like: "NinjaTrader 8 OLD"
    2. Uninstall NinjaTrader from the Windows Control Panel and reinstall using the installer from http://ninjatrader.com/PlatformDirect
    3. Import your strategy and attempt to reproduce the mismatching issue.


    If you ever need to switch back to your original platform, you may do so by closing NinjaTrader and swapping the platform folder names.

    For example, Close NinjaTrader and rename the new "NinjaTrader 8" folder to "NinjaTrader 8 NEW" and the "NinjaTrader 8 OLD" folder to "NinjaTrader 8." Then restart the platform. Simply put: NinjaTrader 8 will always load the "NinjaTrader 8" folder in My Documents.

    I look forward to investigating further.
    JimNinjaTrader Customer Service

    Comment


      #3
      Jim,

      Thanks for responding, and I apologize for not getting back to this thread myself - I decided to rewrite my code in order to avoid the problem, and that seems to be working. However, it would be good to pursue it and find out what the issue is, because I can see that it has happened since (via Print output)

      Unfortunately I can'tsee what steps might be leading to it. I am referencing OnExecutionUpdate within an indicator, but the indicator does nothing but report what OnExecutionUpdate reports. Given its sporadic occurrence, I'm not inclined to spend days clicking away in a clean install just to see if it recurs. I have re-installed NT several times

      It may be connected to a specific sequence of trades and partial closes, but as it it usually works fine, I can't say what that might be.

      This may be something that happens within other installations as well, but without being tracked. It has no effect one's ability to trade, and appears to have no connection to OnPositionUpdate.

      If I can provide any other information, let me know.

      Comment


        #4
        Hello palinuro,

        Steps to reproduce the issue will be the best way we can have the development team chase after an issue. Without a clear way to hit and reproduce the issue it is difficult to analyze and fix.

        That said, are you able to view these mismatchings in the Executions tab, Positions tab, Strategies tab, or is this just seen by the indicator's output for ExecutionUpdate events?

        If these mismatchings can be seen throughout the platform, could you provide screenshots where this can be observed?

        Could you also provide log, trace and database files from a recent occurrence? We will want to look into the database file before it gets reset so trades can be easily referenced.

        You can do this by going to the Control Center-> Help-> Email Support

        Expand 'Other files' and enable 'Database file'.

        Please reference the thread URL and the text "Attention Jim." in this message. Please also provide any detail that can be made clearer to identify a mismatch and when exactly it had a occurred.

        Thanks in advance, I look forward to investigating this further.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by kujista, Today, 05:44 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by elderan, Yesterday, 08:03 PM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by samish18, Yesterday, 08:57 AM
        8 responses
        25 views
        0 likes
        Last Post samish18  
        Started by DJ888, 04-16-2024, 06:09 PM
        3 responses
        10 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by RookieTrader, Today, 07:41 AM
        0 responses
        4 views
        0 likes
        Last Post RookieTrader  
        Working...
        X