Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Session templates and time filters in code

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

    Session templates and time filters in code

    Hi All,

    if my session template is (Mo,Tu,We,Th,F) from 15:30 to 22:00 (GMT +1) Madrid. And in my strategy i have a time filter like this:

    if ((ToTime(Time[0]) >= 153000 && ToTime(Time[0]) < 220000)

    There is no need to use this filter in the code, isn't it?, i mean, do we really need time filters in the strategy code? or is it better to adjust properly the session template.

    Sorry about my english,
    Vince.

    #2
    No worries Vince - correct in your case the time filter would be the same as the session hours given by the template, hence the influence on the strategy OnBarUpdate() calls would be identical.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks Bertrand.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Stanfillirenfro, Yesterday, 09:19 AM
      7 responses
      51 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by TraderCro, 04-12-2024, 11:36 AM
      4 responses
      69 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Mindset, Yesterday, 02:04 AM
      1 response
      15 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by agclub, 04-21-2024, 08:57 PM
      4 responses
      18 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by Irukandji, Today, 04:58 AM
      0 responses
      6 views
      0 likes
      Last Post Irukandji  
      Working...
      X