Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unexpected outcome from sync

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

    #16
    Hi Rich, thanks for the testing - the only idea I would have is changing the TWS shutdown time continuously to avoid running into this, I believe there's also a program available from a 3rd party that would help you achieve that.
    BertrandNinjaTrader Customer Service

    Comment


      #17
      Originally posted by NinjaTrader_Bertrand View Post
      Rich, you can't compare a manual disconnect & reconnect from a connection loss event producing the strategy 'Keep running' state. So you're seeing the exact same issue at TWS shutdown time when the strategy is working for you?
      I'm actually not sure, because when I experenced the problem for the first time, I didn't have all my settings set the way they are now. I'll test and get back to you next week.

      Comment


        #18
        David - I have similar problems using IB with a simulated strategy on NT7B22. My strategies carry positions for weeks at a time. I have been using a third party application called TWSStart that works most of the time. Generally I can leave IB one for weeks at a time without losing my connection to NT. Most of the problems I have are when my internet connections goes down during bad weather. At that point I have to restart NT, restart IB and hope that my accounts don't go out of sync with the strategies.

        Question for NT - I have about 30 strategies that I am running in simulation. They work well except for the scenario described above; when I restart I get out of sync. I do have that strategies grouped into accounts so each account does not have more than one strategy in it that uses the same security. Therefore within each account I don't have to worry about strategies trying to go long and short at the same time.

        In the help file I found the following function that would allow me to synch my strategies and accounts within the strategy, possibly in the OnStartup method:

        int NTMarketPosition(string account)
        Gets the market position for the selected instrument/account combination. Returns 0 for flat, negative for short and positive for long.


        However this appears to only be valid for DLL integration?? Can I use this in Ninjascript code? If not this would appear to solve my problem and others as well. Can this be implemented in NT7 before release?


        Also, I have another enhancement to suggest. I would like to see a totalized summary of positions PnL in the positions tab of the control center. These 30 strategies generate many positions and I would like to see the overall PnL instead of just seeing each security's PnL. At a minimum I would like to see a subtotal for each account. Currently I have to dump it to excel and totalize.

        Comment


          #19
          Hello Gainthogweed,

          Thank you for your suggestions.

          Unfortunately there aren't supported NinjaScript methods for capturing an account position. This isn't something that will make it prior to beta release but something we may consider in the future.

          For PNL reporting have you looked at the account performance feature? This will allow you to generate reports based on specific instruments, or accounts.
          Ryan M.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Stanfillirenfro, Today, 07:23 AM
          3 responses
          10 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by FitSpressoHonest, Today, 09:14 AM
          0 responses
          0 views
          0 likes
          Last Post FitSpressoHonest  
          Started by Davide999, 05-18-2023, 03:55 AM
          4 responses
          556 views
          1 like
          Last Post kcwasher  
          Started by rexsole, Today, 08:39 AM
          2 responses
          7 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by cmtjoancolmenero, Yesterday, 03:58 PM
          6 responses
          29 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X