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)
Im looking for the correct method to initiate a custom timer event as soon as a
AtmStrategyCreate order is initiated. If the order is not filled say within 30 secs, a AtmStrategyCancelEntryOrder cancels the current order.
Also CalculateOnBarClose = true;
Any ideas in the right direction would be greatly appreciated.
Thanks
Can you help answer these questions from other members on NexusFi?
If you search the Ninja forums for "timer" you will find several examples. It should be the same for NT 6.5/7.
The basics are to use a timer event callback routine, start the timer when you initiate an order, check the order status when the timer routine is called, turn the timer off when the order fills. You will need to deal with timing windows though, as a timer could go off while you are processing an order, so you could get a timer event even though you thought you turned it off already. Also consider the case of initiating a timer when it is already running (if you had long timers).