protected override void OnRender(NinjaTrader.Gui.Chart.ChartControl chartControl, NinjaTrader.Gui.Chart.ChartScale chartScale)
 {
     base.OnRender(chartControl, chartScale);
     if (RenderTarget == null || Bars == null || Bars.Instrument == null || myBitmap == null)
     {
         return;
     }
     RenderTarget.DrawBitmap(myBitmap, new SharpDX.RectangleF((float)ChartPanel.W / 2, (float)ChartPanel.H / 2, 150, 150), 1.0f, SharpDX.Direct2D1.BitmapInterpolationMode.Linear);
 }
        protected override void OnRender(NinjaTrader.Gui.Chart.ChartControl chartControl, NinjaTrader.Gui.Chart.ChartScale chartScale)
        {
            //SetZOrder(int.MaxValue);

            //base.OnRender(chartControl, chartScale);

            if (RenderTarget == null || Bars == null || Bars.Instrument == null || myBitmap == null)
            {
                return;
            }

            if (!IsInHitTest)
            {
                RenderTarget.Transform = Matrix3x2.Rotation(myfloat, new Vector2((float)ChartPanel.W / 2, (float)ChartPanel.H / 2));

                RenderTarget.DrawBitmap(myBitmap, new SharpDX.RectangleF((float)ChartPanel.W / 2 - W / 2, (float)ChartPanel.H / 2 - H / 2, W, H), 1.0f, SharpDX.Direct2D1.BitmapInterpolationMode.Linear);

                RenderTarget.Transform = Matrix3x2.Identity;

                RenderTarget.Transform = Matrix3x2.Rotation(-myfloat, new Vector2((float)ChartPanel.W / 2, (float)ChartPanel.H / 2));
            }
        }