Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Unexpected outcome from sync
Collapse
X
-
Originally posted by NinjaTrader_Bertrand View PostRich, 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?
Comment
-
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
-
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 Today, 09:14 AM | ||
Started by FitSpressoHonest, Today, 09:14 AM
|
0 responses
0 views
0 likes
|
Last Post Today, 09:14 AM | ||
Started by Davide999, 05-18-2023, 03:55 AM
|
4 responses
556 views
1 like
|
Last Post
by kcwasher
Today, 09:08 AM
|
||
Started by rexsole, Today, 08:39 AM
|
2 responses
7 views
0 likes
|
Last Post Today, 09:06 AM | ||
Started by cmtjoancolmenero, Yesterday, 03:58 PM
|
6 responses
29 views
0 likes
|
Last Post Today, 08:55 AM |
Comment