Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bars information in custom plot

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

    Bars information in custom plot

    Hi,

    I'm coding an indicator using custom plotting (overriding the Plot method) and let's say I need to draw, for each bar of the price panel, a simple rectangle in the indicator panel. For that, I need to know such things as what bars are displayed in the price panel (for example bar number 500 at position +200 pixels) and the space between each price bar. I don't see these informations in the CustomPlotSample indicator code so my question is what objects/variables can I use to obtain this kind of information?

    Thanks

    #2
    supernatural, this is unfortunately outside of our supported NinjaScript methods, however you can take a look at the PowerVolume indicators for example to get started (i.e. VolumeProfile).

    Comment


      #3
      Ok...
      At least, if a user has done it, how can I just get the X coordinate of a displayed price bar?

      Comment


        #4
        X co ord

        supernatural do a search for ChartHelper in this forum. Some user posted a whole pile of methods to do with grabbing co ords and pixels that is really helpful.
        The major difficulty (for me) was getting the bar index. If it's CurrentBar it is easy but historically it requires.. well you will see.

        GetXByBarIdx() may also help you but NONE of this is supported....

        Comment


          #5
          Mindset, thanks for the help.
          Yes, finally I could get the bar index by doing :
          ChartControl.GetXByBarIdx(BarsArray[0], FirstBarIndexPainted)
          for example for the first painted bar.
          Last edited by supernatural; 09-05-2010, 12:48 PM.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          608 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          355 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          560 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          561 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X