![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
|
Hi,
I had a strategy that had some errors with serialization, causing NT to shut down unexpectedly. I've since fixed those errors, but noticed that one my symbols (NG) is now consistently out of sync with any strategy I run. Is there a way to wipe the slate clean and somehow reset the position information for a particular symbol? Jeremy |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hello Jeremy,
The strategy position is generated by the signals of the strategy. There's no way to state it explicitly. You may consider adding the following lines to your strategy, which means it only runs on real time data. With this the strategy won't run on historical data and should then be in a flat state at the start. if (Historical) return;
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Sep 2010
Posts: 23
Thanks: 0
Thanked 0 times in 0 posts
|
Hi,
I have a question relating to reconcilliation between STRATEGY position and ACCOUNT position. I understand the concept and operation of Strategy vs. Account. What I would like to do is to generate an ALERT or NOTICE (such as an email) when the Strategy is out of Sync with Account positions? With thanks in advance, MT |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hello MKTTHOTS,
Unfortunately this is something that would have to be monitored manually. There aren't built in NinjaScript methods that can access your account position.
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Sep 2010
Posts: 23
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks Ryan & understood. Question, what is the best way to monitor this in your opinion?
|
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
You can use the NinjaTrader control center for this. The strategies tab will show your strategy position. The positions tab will show account positions.
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Member
Join Date: Nov 2009
Posts: 61
Thanks: 2
Thanked 1 time in 1 post
|
How come I don't get the strategy position under strategy tab? The account position under position tab looks fine. I am running NT7.0.1000.1. with IB connection.
|
|
|
|
|
|
#8 |
|
Member
Join Date: Nov 2009
Posts: 61
Thanks: 2
Thanked 1 time in 1 post
|
never mind, I found the reason.
|
|
|
|
|
|
#9 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,411
Thanks: 252
Thanked 976 times in 959 posts
|
Glad you got it resolved, for more info on different sync options in NT7 please see this article from the helpguide - http://www.ninjatrader.com/support/h..._positions.htm
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reset on Sim account hangs | EthanHunt | Version 7 Beta General Questions & Bug Reports | 1 | 09-15-2010 07:54 AM |
| Account.Orders and Account.Positions.FindByInstrument | aljafp | Version 7 Beta General Questions & Bug Reports | 3 | 03-23-2010 10:28 PM |
| GPF when trying to reset Sim account | gg80108 | Miscellaneous Support | 10 | 03-27-2009 10:30 AM |
| Reset Sim account PNL to 0 | gg80108 | Miscellaneous Support | 1 | 03-26-2009 09:28 AM |
| Strategy and Account Positions issues | WhoKnows | Miscellaneous Support | 9 | 02-04-2009 08:12 AM |