Where does this strategy id appear in my broker's platform? (IB TWS - there are many columns to display different info of this kind)
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Question: Live position synchronization
Collapse
X
-
How about this scenario
So, I propose this scenario. This is based on a current live position which I have no intention of messing up to "test" - but I'd like to get development's take on how this would work.
I had a live strategy in GC produce 3 entry fills, all @ 1291.2 Those fills (based on 2 trades of 1 and 2 contracts each) produced two sets each of target and stop orders.
Now, when I start up NT again, I ran the "backtested" results of my strategy to see exactly what my "historical, virtual" position in GC would have been. In this case, the historical results showed that I should have had 2 trades here, with two fills @ 1291.0 and 1 @ 1291.1.
The backtested results here clearly diverge from the live results. I can now expect that if I turn on my GC strategy, none of my "virtual" trades will match up with what was actually traded, and my orders will all be canceled.
Is this correct? Because - if so - there's no way this system of synchronization can work correctly.
CG
Comment
-
Adamus,
If the orders were placed in NinjaTrader with a strategy, then they will have a strategy ID associated with them. You can view this within NinjaTrader, not another application.
If these orders were placed outside of NinjaTrader or a strategy, running a NinjaScript strategy won't cancel them.
Please see link below for more information on this:
Any active orders on the account previously generated by the strategy that does not match an active strategy order will be cancelled.
CG,
Yes, if the executions don't match then the orders won't be assoicated with the most current strategy instance and they will be canceled.Ryan M.NinjaTrader Customer Service
Comment
-
Alright, then your programmers know they have more work to do on this subject, as the current scheme has absolutely no chance of working in "real life" (if there are users out there who disagree, I welcome the comments).Originally posted by NinjaTrader_RyanM View PostCG,
Yes, if the executions don't match then the orders won't be assoicated with the most current strategy instance and they will be canceled.
CG
PS As a simple solution, there can be an option for each instrument to "accept broker's version of position and orders", whereby NT just downloads the position and order information the Broker is holding (I know you can do such a thing in NeoTicker, for example).
Comment
-
Ryan,Originally posted by NinjaTrader_RyanM View PostIf the orders were placed in NinjaTrader with a strategy, then they will have a strategy ID associated with them. You can view this within NinjaTrader, not another application.
If these orders were placed outside of NinjaTrader or a strategy, running a NinjaScript strategy won't cancel them.
what you are saying is that NinjaTrader strategies give their orders a "strategy id" but that this ID is passed to the broker. This is a reason for one of the problems I faced last time I was trying to re-enable a strategy. This is the subject of another thread I am having with you support guys, but it's good to know. Sometimes finding information out from you guys is like trying to squeeze blood from a stone!
I don't think it's impossible, I managed to get going on Sunday evening with about 10 open-position strategies, although it was like trying to herd cats.Originally posted by cgeorgan View PostAlright, then your programmers know they have more work to do on this subject, as the current scheme has absolutely no chance of working in "real life" (if there are users out there who disagree, I welcome the comments).
CG
PS As a simple solution, there can be an option for each instrument to "accept broker's version of position and orders", whereby NT just downloads the position and order information the Broker is holding (I know you can do such a thing in NeoTicker, for example).
There are so many variables involved, just trying to match up orders and positions would only work if the strategy saved its state, i.e. all variable values etc, on shutdown, and then only if the market hadn't moved at all since.
One of the real problems I see is that the historical data I use - provided by InteractiveBrokers on their live feed - is different from the live feed - I can see that if I collect it and compare it. So in practice you could have wildly different outcomes - you could even have trades going in opposite directions.
Just briefly to indulge my desire for a perfect trading platform, assuming that NT implemented strategy state saving on shutdown, what would be useful on re-enabling is an error message saying which order didn't match.
Comment
-
Other Trading Technology issues + Synchronization
Guys-
I'm going to share some real-life stuff about automated trading with Trading Technologies that probably didn't figure into development's plans when writing the NT code.
Trading Technologies, as a platform, is not like Interactive Brokers or other accounts. It does not "track your account" internally, and give you updates daily on your margin, buying power, etc. It is simply a way for traders to place orders on a given exchange, and to that end it will only give you information on trades for the current session ("sessions", in this case, being defined by one's back office operations).
Thus, if @ 3:15 I'm holding multiple positions, I need to know that on my own...because at that time, the Trading Technologies gateway (at least here) resets itself for the next session. All trades disappear, positions appear flat, and there's no record of any position being held.
On the traders end, I need to do two things independently. First, I must manually enter fills that replicate my position prior to the gateway reset. Second, I take a screenshot of my prior position and make a call to clearing to verify my positions with the exchange.
Unfortunately, there is no equivalent procedure in Ninja Trader that would allow me to continue my position. When Ninja itself connects to the TT gateway, it learns that I have "no position" - when in fact, I have a position as logged with the exchange. This would not be a major problem if I had the ability to "write in" positions with Ninja Trader.
It also creates new problems with outstanding orders. You see, Ninja Trader - if account synchronization is set to "true" - will think that Trading Technologies does not have a position when Ninja thinks it's supposed to. In reality, there *is* a position in Trading Technologies, but only one that the trader himself knows and has manually written in. Thus, a forced synchronization will actually cause ones position to double.
On the other hand, by turning off synchronization, none of my outstanding orders will synchronize on re-start. That's fine if my position is 1 or 2 contracts...but for larger, multi-contract positions with multiple exits, that's a big problem. I have to manually enter all those new orders myself.
THAT in and of itself continues to create its own problems. You see, if you create orders outside of Ninja, it doesn't register in Ninja that you're "opening" or "closing" a position. What was originally an order meant to close an open position becomes an order to open a new position for Ninja, throwing more problems into the basket.
The only current "work around" (I hesitate to call it a "solution") right now is to do a mid-day PC restart when TT still knows its position and can transmit that to Ninja Trader. This is feasible Monday-Friday, but you can't do this over weekends. Thus, I am not able to hold any positions from friday to Sunday because of the limitations described above.
I could probably go on with this, but I'm juggling trading, programming, etc here in addition to writing.
The simple fact of the matter is that, for automated trading, the synchronization system is not ready for full-scale implementation. If the developers believe otherwise, I'd love to discuss it with them.
Kind Regards,
CGLast edited by cgeorgan; 09-24-2010, 10:26 AM.
Comment
-
Thank you for the suggestion, CG. One thing to keep in mind here is that not all TT brokerages support overnight positions with NT7. You can see this disclaimer anytime you create or edit the TT connection info. The information reported with overnight positions or positions created outside of NinjaTrader may not be correct, and this is expected with this connection.Ryan M.NinjaTrader Customer Service
Comment
-
I certainly understand and I'm aware of the disclaimer. In this case, I tried to limit suggestions to stuff that - as a programmer myself - could likely be "relatively" easily included in future Beta releases.Originally posted by NinjaTrader_RyanM View PostThank you for the suggestion, CG. One thing to keep in mind here is that not all TT brokerages support overnight positions with NT7. You can see this disclaimer anytime you create or edit the TT connection info. The information reported with overnight positions or positions created outside of NinjaTrader may not be correct, and this is expected with this connection.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
601 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
347 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
559 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
558 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment