![]() |
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
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Jul 2012
Posts: 158
Thanks: 28
Thanked 4 times in 4 posts
|
I've noticed that BarsSinceSession returns the same int asCurrentBar so what's the actual use of it?
And what exactly is the meaning of 'Session'? is it the time of the current trading session? the time of opening a new chart? of loading the indicator? Thanks. |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
|
Hello savekad,
Bars since session returns how many bars has elapsed since the start of the session. http://www.ninjatrader.com/support/h...ncesession.htm Session is the session template you apply on the chart via the Data Series parameter dialog. http://www.ninjatrader.com/support/h...on_manager.htm
Joydeep M.
NinjaTrader Customer Service
Last edited by NinjaTrader_Joydeep; 08-23-2012 at 03:45 AM.
|
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jul 2012
Posts: 158
Thanks: 28
Thanked 4 times in 4 posts
|
So it is the number of bars since the starting of the session according the to session template in use?
That means that there could be a chart loaded with bars of two sessions, and the BarsSinceSession will return the number of bars for the current one, ignoring the previous one, correct? |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Jul 2012
Posts: 158
Thanks: 28
Thanked 4 times in 4 posts
|
I've checked. According to my test the answer is yes.
|
|
|
|
|
|
#5 |
|
NinjaTrader Customer Service
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
|
Hello savekad,
Yes, if you have data for 2 sessions then the Bars.BarsSinceSession will return the bar number of the latest/current session.
Joydeep M.
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| BarsSinceSession | coolmoss | Indicator Development | 5 | 05-30-2012 12:52 PM |
| Bars.BarsSinceSession | zehua | Automated Trading | 1 | 03-06-2012 02:13 AM |
| no BarsSinceSession in strategies? | arnonmoscona | Strategy Development | 1 | 02-20-2012 03:15 PM |
| BarsSinceSession with futures? | heech | General Programming | 5 | 05-28-2009 04:24 AM |
| BarsSinceSession? | heech | General Programming | 1 | 05-17-2009 04:15 AM |