... 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 chbruno, Today, 04:10 PM
|
0 responses
3 views
0 likes
|
Last Post
by chbruno
Today, 04:10 PM
|
||
Started by josh18955, 03-25-2023, 11:16 AM
|
6 responses
436 views
0 likes
|
Last Post
by Delerium
Today, 03:42 PM
|
||
Started by FAQtrader, Today, 03:35 PM
|
0 responses
6 views
0 likes
|
Last Post
by FAQtrader
Today, 03:35 PM
|
||
Started by rocketman7, Today, 09:41 AM
|
5 responses
19 views
0 likes
|
Last Post Today, 03:33 PM | ||
Started by frslvr, 04-11-2024, 07:26 AM
|
9 responses
127 views
1 like
|
Last Post
by caryc123
Today, 03:12 PM
|
Comment