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 hdge4u, 04-29-2024, 12:23 PM
|
5 responses
28 views
0 likes
|
Last Post
by MisterTee
Today, 04:26 PM
|
||
Started by llanqui, 01-25-2024, 06:15 PM
|
9 responses
64 views
0 likes
|
Last Post
by MisterTee
Today, 04:24 PM
|
||
Started by tradingnasdaqprueba, 05-07-2024, 03:42 AM
|
16 responses
65 views
0 likes
|
Last Post Today, 04:10 PM | ||
Started by Vulgoth_t_Destroyer, 05-09-2022, 04:45 PM
|
55 responses
5,461 views
0 likes
|
Last Post
by BartMan
Today, 03:25 PM
|
||
Started by DawnTreader, 05-08-2024, 05:58 PM
|
16 responses
52 views
0 likes
|
Last Post
by DawnTreader
Today, 03:20 PM
|
Comment