• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Program Execution Delay

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    #2
    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
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Is there any example of an inline Delay that would work with Ninja? I just need to delay the execution and then continue?

      Comment


        #4
        Originally posted by afshinmoshrefi View Post
        Is there any example of an inline Delay that would work with Ninja? I just need to delay the execution and then continue?
        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.

        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 eostradingsystems, Today, 08:11 AM
        1 response
        10 views
        0 likes
        Last Post MojoJojo  
        Started by Lumbeezl, Yesterday, 06:32 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_Kate  
        Started by JImJinNJ, Today, 07:28 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_RyanS  
        Started by Jorge.andres.o, Yesterday, 08:22 PM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by lju45, Today, 07:00 AM
        4 responses
        20 views
        0 likes
        Last Post lju45
        by lju45
         
        Working...
        X