Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
PC reloaded - how to restore the work of my strategies?
Collapse
X
-
PC reloaded - how to restore the work of my strategies?
I have a strategy that is working on market without takeprofit or stoploss. The startegy has entered a position and after that my PC has reloaded. How can I continue my work with open positions after the strategies have reloaded.Tags: None
-
Hello knell009,
Thank you for your post and welcome to the NinjaTrader support forum!
Strategies will not be able to pick up where they left off after a restart of the NinjaTrader platform. However, you can use the settings under Tools > Options > Strategies > NinjaScript to set how the strategy react when enabled and disabled. Setting 'On starting a real-time strategy' to 'Immediately submit live working historical orders' will submit orders for historical positions that would be in place if the strategy had continued to run. You can also enable 'Sync Account Position' to true when enabling the strategy.
For information on syncing your account and strategy position please visit the following link: http://www.ninjatrader.com/support/h..._positions.htm
Please let me know if you have any questions.
-
Hello knell009,
Thank you for your response.
It is possible to access the account positions via unsupported code. You would then need to base your calculations off of the account position.
Below is a n example of accessing the account position:Please let me know if I may be of further assistance.Code:foreach (Account acct in Cbi.Globals.Accounts) { if (acct.Positions != null) { PositionCollection positions = acct.Positions; foreach (Position pos in positions) { Print(pos.Account.Name + " " + pos.Instrument + " " + pos.MarketPosition + " " + pos.Quantity + " " + pos.AvgPrice); } }
Comment
-
Hello knell009,
Thank you for your post.
You will need to track your own IOrder objects for the orders in your strategy and then call these IOrder objects and their AvgFillPrice.
For information on IOrder objects please visit the following link: http://www.ninjatrader.com/support/h...nt7/iorder.htm
Please let me know if I may be of further assistance.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
666 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
377 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
110 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
575 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
580 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment