await Task.Delay don't seem to work with NinjaTrader?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Program Execution Delay
Collapse
X
-
Program Execution Delay
I have a need to delay execution of the c# code of Plot for about 100 millisecond. How can I implement this delay in Ninja?
await Task.Delay don't seem to work with NinjaTrader?Last edited by afshinmoshrefi; 03-15-2015, 01:00 PM.Tags: None
-
Hello afshinmoshrefi,
Thank you for your post.
You could use a timer in the Plot override.
For an example on overriding the plot please go to Tools > Edit NinjaScript > Indicator > CustomPlotSample.
For information on the Timer Class in C# please visit the following link: https://msdn.microsoft.com/en-us/lib...vs.110%29.aspx
-
Is there any example of an inline Delay that would work with Ninja? I just need to delay the execution and then continue?
Comment
-
Here is the specific answer: http://www.ninjatrader.com/support/f...t.php?p=354271. You can try using a while loop, and exit the loop after the delay expires.Originally posted by afshinmoshrefi View PostIs there any example of an inline Delay that would work with Ninja? I just need to delay the execution and then continue?
You might want to read the entire thread.Last edited by koganam; 03-15-2015, 09:42 PM.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
152 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
89 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
131 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
127 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
107 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment