I have an indicator that is giving me puzzling results - I hope someone out there can tell me why.
My indicator starts up "in the security panel", as an Overlay indicator.
It does a few things, including:
1) changes bar coloring,
2) uses Draw.AAA methods to draw simple shapes near bars
3) uses SharpDX methods to draw complex shapes near bars
(2 and 3 happen during OnRender()).
The indicator has an optional additional behavior that the user can control through a checkbox (implemented via a "Browseable" public boolean property in my indicator). When the user checks off that box (and clicks Apply), my application effectively shifts out of the "security panel" and into its own panel. (I explain how, here: https://forum.ninjatrader.com/forum/...22#post1247622 ).
This works fine EXCEPT: when the indicator moves to a separate (new) panel, created by the NT8 framework, then the following happens:
1) changed bar coloring, stays as I changed it
2) simple shapes drawn using Draw.AAA methods, stay drawn
3) complex shapes drawn using SharpDX methods - these disappear.
It's weirder. OnBarUpdate() and OnRender() are called for my indicator and, when it is in the separate panel, It takes the actions to implement (1), (2) and (3), and, in essence, the SharpDX actions are ignored - I make the calls and nothing appears.
So really, I'm discovering that when my Indicator is outside the security panel, I can change the Security coloring, and I can draw with Draw.AAA but I fail to draw with SharpDX.
When the user brings up configuration and unchecks the feature, and my Indicator goes back into the "security panel", low and behold the shapes drawn using SharpDX are permitted to appear.
Questions:
Q1. Is there some rule that says a non-overlay indicator (one "living" in a panel other than the security) may not draw SharpDX objects in the security panel?
Q2. Is there some parameter I need to specify to stipulate that "this shape SHOULD BE IN THE SECURITY PANEL" like in some of the Draw.AAA calls?



Comment