NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 04-16-2012, 03:29 AM   #1
vibarco
Member
 
Join Date: Aug 2011
Posts: 37
Thanks: 1
Thanked 0 times in 0 posts
Default 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.
vibarco is offline  
Reply With Quote
Old 04-16-2012, 04:26 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
Default

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.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 04-16-2012, 05:25 AM   #3
vibarco
Member
 
Join Date: Aug 2011
Posts: 37
Thanks: 1
Thanked 0 times in 0 posts
Default

Thanks Bertrand.
vibarco is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Session Templates cabmanage Charting 7 06-13-2011 10:42 AM
Session templates and holidays zweistein Version 7 Beta General Questions & Bug Reports 6 08-27-2010 06:20 AM
Session templates Harry Version 7 Beta General Questions & Bug Reports 3 01-31-2010 12:55 PM
session templates and first bar of session dave1992 Version 7 Beta General Questions & Bug Reports 18 12-10-2009 09:39 AM
Is it possible to set "Session begins (local time)" from code? ChiTrader2000 Strategy Development 5 01-07-2009 07:27 AM


All times are GMT -6. The time now is 01:49 AM.