Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to associate a price level with a SharpDX Y level?

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

    How to associate a price level with a SharpDX Y level?

    I've begun using SharpDX to plot text on a chart. One thing I can't figure out is how to plot to a particular price level on the chart. SharpDX deals in pixels, I believe. How is this conversion done?

    #2
    I found the answer:

    protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
    {
    int yLevel = chartScale.GetYByValue(17850); // Price level is 17850

    ....

    SharpDX.RectangleF rectangleF = new SharpDX.RectangleF(startPoint.X, yLevel, ChartPanel.W, ChartPanel.H);
    }

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    236 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    151 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    162 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    243 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    198 views
    0 likes
    Last Post CarlTrading  
    Working...
    X