Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is there a way to specify a condition for number of bars in a a time slot?

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

    Is there a way to specify a condition for number of bars in a a time slot?

    Is there a way to specify a condition in the Strategy Wizard for the number of bars in a time slot? For example when using a non time based chart specify that if there are this number of bars in a time slot for example from 10 to 11 am then do the following. I think I can specify the time slot already but I need something that counts bars so that I can give it a numerical value. I don't know if there is anything that can be used for this purpose. Perhaps you can point me in the right direction. Thanks.

    #2
    Originally posted by bijan View Post
    Is there a way to specify a condition in the Strategy Wizard for the number of bars in a time slot? For example when using a non time based chart specify that if there are this number of bars in a time slot for example from 10 to 11 am then do the following. I think I can specify the time slot already but I need something that counts bars so that I can give it a numerical value. I don't know if there is anything that can be used for this purpose. Perhaps you can point me in the right direction. Thanks.
    One way would be to use Bars.GetBar() to get the corresponding bar number for your initial and end times, then take the difference.

    Comment


      #3
      bijan, you would unfortunately not be able to do this within the wizard interface, but definitely with custom coding in our NinjaScript.
      BertrandNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Vietanhnguyen2hotmailcom, Yesterday, 10:29 AM
      4 responses
      23 views
      0 likes
      Last Post Vietanhnguyen2hotmailcom  
      Started by PhillT, 04-19-2024, 02:16 PM
      4 responses
      35 views
      0 likes
      Last Post PhillT
      by PhillT
       
      Started by ageeholdings, 05-01-2024, 05:22 AM
      5 responses
      37 views
      0 likes
      Last Post ageeholdings  
      Started by reynoldsn, Today, 02:34 PM
      0 responses
      13 views
      0 likes
      Last Post reynoldsn  
      Started by nightstalker, Today, 02:05 PM
      0 responses
      21 views
      0 likes
      Last Post nightstalker  
      Working...
      X