Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Keeping Text viewable on Chart

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

    Keeping Text viewable on Chart

    I have a code sequence that evaluates on each new bar. In the following line:

    Draw.Text(this, "test1", true, "Test1", -1, Ohi , 10, TextBrush, myFont, TextAlignment.Right, Brushes.DarkGreen, Brushes.Transparent, 25);

    The text position TextAlignment.Right is of course relative to the current bar position when the query is true.

    If I scroll the screen to look back historically the test will disappear as it is relative to the bar. Is there an overwrite way to keep this text visible when scrolling the chart backward in time or do I need to be using another text method to do so, for example SharpDX.DirectWrite?


    #2
    Hello johnMoss,

    Thank you for your post.

    You could use custom rendering via SharpDX, for an example see SampleCustomRender in the platform. Or, you could use Draw.TextFixed which will draw text in one of 5 available pre-defined fixed locations on panel 1 (price panel) of a chart.



    Please let us know if you have any further questions.

    Comment


      #3
      Thank you Gaby, I need text to stay at a price point so Sharp DX looks like the option. I've taken a cursory look at the SharpDX in the library. Do we have any other reference examples for code structure?

      Comment


        #4
        SampleCustomRender in the platform is a good reference. I am not aware of any other example that specifically demonstrates attaching text to a specific price point.

        Below is further documentation on custom rendering text.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        558 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        324 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        545 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X