NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 05-15-2008, 08:44 PM   #1
Burga1
Senior Member
 
Join Date: Nov 2007
Posts: 388
Thanks: 0
Thanked 0 times in 0 posts
Default Forcing time delays?

Greetings,

Is it possible to setup a time delay/pause? I'd like to "pause" NT for a short period of time within a strategy (maybe a few minutes). A command like "Sleep(X);" seems to cause an error.

Thank you.
Burga1 is offline  
Reply With Quote
Old 05-15-2008, 11:17 PM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Unfortunately this is not supported.

Note: You NEVER should code something like Sleep() in NinjaScript, since this could throw off NT internal logic.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 05-16-2008, 11:09 AM   #3
Burga1
Senior Member
 
Join Date: Nov 2007
Posts: 388
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks for the reply. If a command like Sleep is not permissable, how do people normally "delay" their strategies?

I simply want to "wait" for some outside (of NT) process to complete, then "continue" on with the strategy as some data from the outside process will be required to be "read into" the strategy to continue.
Burga1 is offline  
Reply With Quote
Old 05-16-2008, 11:10 AM   #4
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Check out this sample which uses a timer: http://www.ninjatrader-support.com/v...ead.php?t=5965
NinjaTrader_Dierk is offline  
Reply With Quote
Old 05-16-2008, 11:28 AM   #5
Burga1
Senior Member
 
Join Date: Nov 2007
Posts: 388
Thanks: 0
Thanked 0 times in 0 posts
Default

Thank you for the link!
Burga1 is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting stored chart data and forcing a fresh download steve0617 Charting 7 05-07-2010 03:19 PM
Forcing a position to close Edgar V. General Programming 1 04-02-2008 04:42 PM
"Forcing" a Plot style from NinjaScript? higler Indicator Development 1 03-15-2008 05:49 PM
Forcing Volume Charts TAJTrades General Programming 5 01-20-2008 02:28 PM
NT causing data delays from 100% CPU usage Jibu V Miscellaneous Support 4 08-18-2007 11:26 AM


All times are GMT -6. The time now is 09:43 PM.