PDA

View Full Version : CustomPlotSample


hemlock
10-21-2009, 08:11 AM
In NT 6.5 when applying the CustomPlotSample indicator to panel 1 the price bars would disappear. This was good because I had indicators that were based on this sample indicator and I expected that behaviour.

Now in NT 7 when applying the CustomPlotSample indicator to panel 1 the price bars are still showing. Is this expected for NT 7? If so, how can we remove the price bars when overriding the Plot method?

Thanks

NinjaTrader_Josh
10-21-2009, 08:17 AM
hemlock,

Could not reproduce. I added CustomPlotSample to the first panel and it drew on top of the bars. Perhaps you have messed with the z-ordering of your objects on the chart. Please select the indicator just by clicking and then hold SHIFT and mouse wheel up/down.

hemlock
10-21-2009, 08:33 AM
Not sure how I messed with the zorder but you were correct. I sent the standard price bars to level 2 and all is well.

I take that back, all might not be well. It seems once the standard price bars are sent to level 2 the normal "chart" mouse functions cease to work. It seems that the mouse functions are tied to the indicator not the chart. Since the indicator (in this case the CustomPlotSample) takes over the entire chart, the mouse functions are tied to the indicator not the chart. That's what it seems like to me anyway.

1. Scrolling with the mouse does not appear to work.
2. Left clicking no longer brings up the properties dialog.

NinjaTrader_Josh
10-21-2009, 09:02 AM
hemlock,

It is accurate because you basically have the indicator selected the whole time. Since the indicator takes up the whole panel you are accessing the indicator properties, etc.

hemlock
10-21-2009, 09:09 AM
OK.

To me this is drastically different than version 6.5. I have several indicators that have custom plots that use the entire chart panel (i.e. market delta, volume profiling, etc...). I would hate to lose the mouse scrolling ability on these indicators when using version 7.

I would suspect other users have custom plots as well that will be affected.

Is there anyway to change this behaviour?

NinjaTrader_Josh
10-21-2009, 09:34 AM
Couldn't you still scroll with the x-axis scrollbar?

hemlock
10-21-2009, 09:55 AM
Couldn't you still scroll with the x-axis scrollbar?

Obviously yes I could use the scroll bar. Typically I don't have the scroll bar displayed. Sometimes I like to scroll into the future which I can't do with the scroll bar. (yes I could use BarMarginRight but it's really not the same). Plus I think you have taken some functionality away. Disappointed, yes, deal breaker, no. Trivial matter for your developers to change, probably not.

NinjaTrader_Ray
10-21-2009, 10:39 AM
Obviously yes I could use the scroll bar. Typically I don't have the scroll bar displayed. Sometimes I like to scroll into the future which I can't do with the scroll bar. (yes I could use BarMarginRight but it's really not the same). Plus I think you have taken some functionality away. Disappointed, yes, deal breaker, no. Trivial matter for your developers to change, probably not.

We will look into this. One option could be to somewhow exclude custom rendering from the object selection hit test however, I am not sure of implications of doing something like this.

hemlock
10-21-2009, 10:48 AM
Thanks Ray, will look forward to what you find out.

NinjaTrader_Ray
11-04-2009, 07:27 AM
We have added a feature that will allow you to exclude user defined Plot() method drawn objects from the hit test logic.

In your Plot() method, you will need to do something like:



if (!InHitTest)
graphics.FillRectangle(tmpBrush, new Rectangle (0, 0, 2000, 2000));


The above rectangle would be exlcuded from any hit test logic.