I am trying to visualize Ellipses with colors based on indicator values. For example the two ends of the spectrum are Red and Green. I want to fill Ellipses with colors like these:
10% Red + 90% Green or 70% Red + 30% Green. Here percentages are based on indicator values.
I attach a video and you can see that some Ellipses are filled with red or green color and then are repainted with yellow color, which is just 50% Red + 50% Green.
I printed brushes just before RenderTarget.FillEllipse. The code is:
Print("OnRender, CurrentBar = " + CurrentBar + ", i = " + i + ", " + RenderTarget.ToString() + ", currentDXbrush.Color = " + currentDXbrush.Color.ToString()); RenderTarget.FillEllipse(currentEllipse, currentDXbrush);
OnRender, CurrentBar = 3079, i = 1, SharpDX.Direct2D1.WindowRenderTarget, currentDXbrush.Color = Alpha:0.5 Red:215 Green:48 Blue:0
OnRender, CurrentBar = 3079, i = 2, SharpDX.Direct2D1.WindowRenderTarget, currentDXbrush.Color = Alpha:0.5 Red:186 Green:109 Blue:0
OnRender, CurrentBar = 3079, i = 3, SharpDX.Direct2D1.WindowRenderTarget, currentDXbrush.Color = Alpha:0.5 Red:217 Green:46 Blue:0
OnRender, CurrentBar = 3079, i = 4, SharpDX.Direct2D1.WindowRenderTarget, currentDXbrush.Color = Alpha:0.5 Red:211 Green:55 Blue:0
OnRender, CurrentBar = 3079, i = 5, SharpDX.Direct2D1.WindowRenderTarget, currentDXbrush.Color = Alpha:0.5 Red:179 Green:131 Blue:0
OnRender, CurrentBar = 3079, i = 6, SharpDX.Direct2D1.WindowRenderTarget, currentDXbrush.Color = Alpha:0.5 Red:189 Green:101 Blue:0
OnRender, CurrentBar = 3079, i = 7, SharpDX.Direct2D1.WindowRenderTarget, currentDXbrush.Color = Alpha:0.5 Red:185 Green:114 Blue:0
OnRender, CurrentBar = 3079, i = 8, SharpDX.Direct2D1.WindowRenderTarget, currentDXbrush.Color = Alpha:0.5 Red:19 Green:136 Blue:0
How can I stop NinjaTrader from repainting Ellipses?
Thanks,
Valentin
Comment