Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Interesting thread and it's something that has been on my mind as I've been trying to learn NT7 over the last few weeks. This stuff is important not just for crash handling but in the event of power failure/etc too where you want to resume the trade. After NT7 restarts after a crash/reboot, will the strategy remain in the Strategies tab and be checked Enabled?
Bear in mind I'm still new to NT and maybe this is new to NT7 also but I can see Account.Orders in there which is an OrderCollection. Give that you know already (or at least you should!) what the order signal name is for a given strategy you should be able to query each order in the collection, match its status and signal name to retrieve it.
In this code example I'm just guessing that you can cast to IOrder from the OrderCollection. When I did backtesting using the following code I found the count was always 0, which I suppose is understandable for a backtest, but it didn't really answer my question properly. Maybe someone with a live trading account can give it a shot?
System.Collections.IEnumerator Test = Account.Orders.GetEnumerator();
for (int i = 0; i < Account.Orders.Count; i++)
{
IOrder TestOrder = (IOrder) Test.Current;
Print("Current " + Test.Current);
Test.MoveNext();
}
Aside from that I'm being careful to avoid any loose-hanging variables that are set on the fly that would need to be re-filled during the OnStartUp() after you've got the orders back out of the collection. And personally I don't really like that practice anyway.