Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw.Text() every bar at the botton of chart

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

    Draw.Text() every bar at the botton of chart

    Hello

    How can we use Draw.Text() with the y co-ordinate location at the botton of chart similar as bar statistics on Volumetric Bars?

    Thanks

    #2
    Hello Rosario,

    Thanks for your post.

    You would not be able to use Draw.Text() to achieve similar to the bar statistics with Volumetric bars because Draw.Text requires a price value to show the text, as the scale of the chart changes so would the text move up or down with the changes of the scale.

    To accomplish your goal, you would need to use the more complex Drawing in OnRender() which uses the chart coordinates to place the drawings, the method OnCalculateMinMax can be used to control the scaling so that the bars do not get drawn in the text. You would use RenderTarget.DrawTextLayout for text.

    If you are not familiar with these methods, please see the indicator SampleCustomRender in your Ninjatrader that will give you some idea of the coding required.
    In addition, there are key references in the help guide:


    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    77 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    109 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    57 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    108 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    65 views
    0 likes
    Last Post PaulMohn  
    Working...
    X