NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 03-16-2010, 03:01 AM   #1
pespinar
Junior Member
 
Join Date: Jan 2009
Posts: 14
Thanks: 0
Thanked 0 times in 0 posts
Default Number of bars of a session

Hello,

my question is if I can get programatically the numbers of bar of a session from within a strategy. I want to program a strategy with a ATR stop loss with the period being the bars of a intraday session, and I want to backtest it to a number of instruments with different open/close hours, and timeframe, with a single click.

Any ideas?

Un saludo,

Pablo
pespinar is offline  
Reply With Quote
Old 03-16-2010, 04:09 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,403
Thanks: 252
Thanked 972 times in 955 posts
Default

Pablo, you could work with Bars.BarsSinceSession for this task - http://www.ninjatrader-support.com/H...ceSession.html
NinjaTrader_Bertrand 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
Number of bars in a data series? dhunnewell Indicator Development 1 02-26-2010 04:05 AM
First Bar of Session/ referring to bars during session mefTrader General Programming 2 01-07-2010 09:51 AM
Add a second instrument to strategy with day session (regular session) only bars net4walk Strategy Development 11 12-27-2009 10:20 PM
Number of lots traded in a session John833 Strategy Development 2 01-09-2009 05:49 AM
bar number of viewable bars? foxthorn Indicator Development 3 09-25-2008 04:22 PM


All times are GMT -6. The time now is 10:21 AM.