Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Relative Bar Number

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.
    Attached Files

    #2
    a) no need to loop through all bars on ever OnBarUpdate call. A simple
    Code:
            protected override void OnBarUpdate()
            {
                Bar.Set(CurrentBar);
            }
    would do it
    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

    Comment


      #3
      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


        #4
        Got it, thanks

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by suroot, 02-25-2017, 04:43 AM
        11 responses
        2,546 views
        0 likes
        Last Post Zilvercat  
        Started by Rogers101, 05-05-2024, 11:30 AM
        16 responses
        50 views
        0 likes
        Last Post Rogers101  
        Started by ninza33, Today, 12:31 PM
        2 responses
        9 views
        0 likes
        Last Post ninza33
        by ninza33
         
        Started by Bobin, 03-12-2024, 08:51 AM
        15 responses
        481 views
        0 likes
        Last Post fiddich
        by fiddich
         
        Started by Skifree, Today, 11:21 AM
        4 responses
        15 views
        0 likes
        Last Post Skifree
        by Skifree
         
        Working...
        X