Cheers!
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
BarsSinceSession Conversion
Collapse
X
-
Hello aligator,
Thanks for your post.
With reference to the code-breaking change section of the help guide, BarsSinceNewTradingDay is the NT8 equivalent of the NT7 BarsSinceSession:
Reference: https://ninjatrader.com/support/help...ng_changes.htm
If you are using a multisession trading day and want to keep track of the bars since each session begins, you can use the bool IsFirstBarOfSession as a starting point to set an int type counter and update the counter on each new bar.
For example:
if (Bars.IsFirstBarOfSession)
{
myBarsSinceSession = 1; // set/reset counter on each new session (you would need to create myBarsSinceSession as an int type variable)
}
if (IsFirstTickOfBar)
{
myBarsSinceSession++; // increment counter
}
References:
https://ninjatrader.com/support/help...rofsession.htm
https://ninjatrader.com/support/help...ttickofbar.htm
Leave a comment:
-
BarsSinceSession Conversion
Dear Support,
What is the NT8 conversion for the following NT7 bar index?:
Code:int barsSince = Bars.BarsSinceSession;
Many Thanks.Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Gathem, Yesterday, 06:06 PM
|
2 responses
27 views
0 likes
|
Last Post
|
||
Started by Malekyou, 01-15-2021, 07:42 AM
|
3 responses
25 views
0 likes
|
Last Post
![]() |
||
Started by frankduc, Today, 06:59 AM
|
1 response
8 views
0 likes
|
Last Post
|
||
Started by jack1234, 05-03-2017, 08:41 AM
|
8 responses
2,934 views
0 likes
|
Last Post
|
||
Started by prodigaltrader, Today, 12:18 AM
|
1 response
12 views
0 likes
|
Last Post
|
Leave a comment: