Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
How to associate a price level with a SharpDX Y level?
Collapse
X
-
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?Tags: None
-
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);
}
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Irukandji, 05-06-2024, 03:06 PM
|
3 responses
27 views
0 likes
|
Last Post Today, 09:36 AM | ||
Started by RamiRK86, 05-06-2024, 08:05 AM
|
2 responses
31 views
0 likes
|
Last Post
by RamiRK86
Today, 09:35 AM
|
||
Started by synthhokie, Today, 09:24 AM
|
1 response
20 views
0 likes
|
Last Post Today, 09:30 AM | ||
Started by sofortune, Yesterday, 09:49 PM
|
4 responses
17 views
0 likes
|
Last Post Today, 09:27 AM | ||
Started by phayes, Today, 09:13 AM
|
2 responses
25 views
0 likes
|
Last Post
by phayes
Today, 09:22 AM
|
Comment