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 johnMoss, Today, 12:19 PM
|
3 responses
13 views
0 likes
|
Last Post Today, 01:47 PM | ||
Started by xepher101, 05-10-2024, 12:19 PM
|
7 responses
94 views
0 likes
|
Last Post Today, 01:45 PM | ||
Started by quicksandatl, 05-09-2024, 11:11 AM
|
6 responses
53 views
0 likes
|
Last Post Today, 01:13 PM | ||
Started by AlgoDreamer, Today, 10:39 AM
|
4 responses
22 views
0 likes
|
Last Post
by AlgoDreamer
Today, 12:37 PM
|
||
Started by RamiRK86, 05-06-2024, 08:05 AM
|
3 responses
39 views
0 likes
|
Last Post Today, 12:35 PM |
Comment