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.
Last edited by sam028; May 18th, 2010 at 05:16 AM.
Reason: add coding tag
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).
Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.
Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.
If you want to support our community, become an Elite Member.
The following 4 users say Thank You to Big Mike for this post: