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 suroot, 04-10-2017, 02:18 AM
|
4 responses
3,021 views
0 likes
|
Last Post
by truepenny
Today, 08:01 AM
|
||
Started by Stanfillirenfro, Today, 07:23 AM
|
1 response
6 views
0 likes
|
Last Post Today, 07:37 AM | ||
Started by cmtjoancolmenero, Yesterday, 03:58 PM
|
2 responses
22 views
0 likes
|
Last Post Today, 07:24 AM | ||
Started by olisav57, Yesterday, 07:39 PM
|
1 response
9 views
0 likes
|
Last Post Today, 07:23 AM | ||
Started by cocoescala, 10-12-2018, 11:02 PM
|
7 responses
944 views
0 likes
|
Last Post
by Jquiroz1975
Today, 07:21 AM
|
Comment