![]() |
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Nov 2007
Posts: 388
Thanks: 0
Thanked 0 times in 0 posts
|
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. |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Unfortunately this is not supported.
Note: You NEVER should code something like Sleep() in NinjaScript, since this could throw off NT internal logic.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Nov 2007
Posts: 388
Thanks: 0
Thanked 0 times in 0 posts
|
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. |
|
|
|
|
|
#4 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Check out this sample which uses a timer: http://www.ninjatrader-support.com/v...ead.php?t=5965
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Nov 2007
Posts: 388
Thanks: 0
Thanked 0 times in 0 posts
|
Thank you for the link!
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |