Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Relative Bar Number
Collapse
X
-
Relative Bar Number
The mini routine attached worked fine in NT 6.5 to define the relative bar number in the databox. In NT 7 it doesn't work.Tags: None
-
a) no need to loop through all bars on ever OnBarUpdate call. A simpleCode:protected override void OnBarUpdate() { Bar.Set(CurrentBar); }
b) the issue is here:
Color.FromKnownColor(KnownColor.Transparent)
I believe Transparent plots now have a different logic. Just set any non-transparent color and you should be good
-
The color seems to be the reason of not working at all.
The code you suggest, gives to the nth bar the number (n-1). The code I suggest and need, gives to the last bar 0, the bar before 1 etc. ... that means the mirror image
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by algospoke, Yesterday, 06:40 PM
|
2 responses
23 views
0 likes
|
Last Post
by algospoke
Today, 07:04 PM
|
||
Started by ghoul, Today, 06:02 PM
|
3 responses
14 views
0 likes
|
Last Post Today, 06:43 PM | ||
Started by jeronymite, 04-12-2024, 04:26 PM
|
3 responses
45 views
0 likes
|
Last Post
by jeronymite
Yesterday, 10:10 PM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
7 responses
21 views
0 likes
|
Last Post Today, 06:16 PM | ||
Started by AttiM, 02-14-2024, 05:20 PM
|
10 responses
181 views
0 likes
|
Last Post
by jeronymite
Today, 06:11 PM
|
Comment