... for (int idx = ChartBars.FromIndex; idx <= ChartBars.ToIndex; idx++) { float x = chartControl.GetXByBarIndex(ChartBars, idx); long v2 = ChartBars.Bars.GetVolume(idx); float v2y = chartScale.GetYByValue(v2); rect.X = x - barWidth * 0.5f + 0.5f; rect.Y = 0; rect.Width = barWidth - 1; rect.Height = v2; RenderTarget.FillRectangle(rect, cbrush); }cbrush.Dispose(); } ...
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
OnRender method draws rectangles upsidedown
Collapse
X
-
OnRender method draws rectangles upsidedown
I wish to use SharpDX to draw volume bars that overlap the main chart, while controlling its opacity dynamically. This is what I've attempted so far:
Code:Last edited by bkinvent; 01-22-2016, 01:30 AM.Tags: None
-
Hello,
Thank you for the question.
I checked the sample but was noticed there are a few missing variables here, I wanted to see if you could post a full example with your variables and how you are calculating the barWidth variable.
I would like to first see what you are before trying to address your question.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by AaronKoRn, 04-27-2024, 09:49 PM
|
3 responses
31 views
0 likes
|
Last Post
by AaronKoRn
Today, 03:47 PM
|
||
Started by f.saeidi, Today, 07:07 AM
|
6 responses
19 views
0 likes
|
Last Post
by f.saeidi
Today, 03:31 PM
|
||
Started by cmtjoancolmenero, Today, 02:31 PM
|
6 responses
15 views
0 likes
|
Last Post Today, 03:29 PM | ||
Started by Graci117, Yesterday, 11:40 PM
|
5 responses
27 views
0 likes
|
Last Post Today, 03:29 PM | ||
Started by rene69851, Today, 03:25 PM
|
0 responses
3 views
0 likes
|
Last Post
by rene69851
Today, 03:25 PM
|
Comment