View Full Version : NT not in sync Broker
GerTrader
09-10-2009, 07:08 AM
Hello,
when my NinjaTrader is flat, i have a net position of -1 in the ZB-Contract and when NT is Long(1), I'am flat. How can I tell NT, that this Long Position in fact does not exist? Restarting did not help.
NinjaTrader_Bertrand
09-10-2009, 07:20 AM
GerTrader, is this via manual or automatic trading? For NinjaScript strategies proper synching between the strategy and account position is vitally important - http://www.ninjatrader-support.com/HelpGuideV6/StrategyPositionVsAccountPosition.html
GerTrader
09-10-2009, 07:49 AM
NinjaTrader and Broker are out of sync.
NT: Long 1
Broker: Flat
I want to tell NT, that the Long-Position does not exist.
NinjaTrader_Bertrand
09-10-2009, 07:53 AM
Then just add a manual execution to the NinjaTrader database taking you net flat to sync - http://www.ninjatrader-support.com/HelpGuideV6/ExecutionsTab.html
GerTrader
09-10-2009, 08:24 AM
I manually added a Sell Execution, restarted NinjaTrader but the open Position (Long) still remains there in NT. The real net position is still flat. However, i also tried it in Simulation Mode before on another computer and it did work.
I am using TT as broker interface, is there a difference, which applies?
NinjaTrader_Bertrand
09-10-2009, 08:27 AM
GerTrader, is this from an overnight position? This is unfortunately not supported for NinjaTrader 6.5 and the TT connection, for NinjaTrader 7 some TT broker architectures will support this then - http://www.ninjatrader.com/webnew/NT7/NinjaTrader7.html
If the manually added exectution did not help, please reset the DB under Tools > Options > Misc
GerTrader
09-10-2009, 09:01 AM
I tried it twice, but the position still remains there.
I disconnected; reseted DB; restarted NT; connected to TT and the position was there. All historical data is gone but one buy execution and one open position remained. I manually deleted this execution, restarted NT, connected to TT and the execution was back there.
It seems that the Execution is re-created when NT connects to TT, according to the timestamp of the execution.
And yes, it may be due to a unintended overnight position...
NinjaTrader_Bertrand
09-10-2009, 09:09 AM
GerTrader, are you sure the account is flat at your broker?
GerTrader
09-10-2009, 09:28 AM
yes, broker has a web interface and I also receive daily statements.
NinjaTrader_Bertrand
09-10-2009, 10:03 AM
I see GerTrader, thanks - I would suggest trying then a complete fresh database file by
Exiting NinjaTrader
Then go to MyDocuments\NinjaTrader 6.5\db and rename the NinjaTrader.mdb into for example NinjaTrader.Old.mdb
Restart NinjaTrader after this step and it will create a new database file
Then connect to your TT feed and you should be flat.
If not, please call your broker and have them look into the account status