Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Fixed Scale mouse dragging bug?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Fixed Scale mouse dragging bug?

    I am finding an issue using the mouse to drag and adjust the vertical scaling.

    This issue occurs when an indicator that uses drawing objects set to autoscale = true is accompanied with a dataseries that is set to autoscale = false.

    Consider an indicator with the following code:

    Code:
            protected override void Initialize()
            {
                Overlay		= true;
    			AutoScale 	= true;
            }
    
            /// <summary>
            /// Called on each bar update event (incoming tick)
            /// </summary>
            protected override void OnBarUpdate()
            {
                // Use this method for calculating your indicator values. Assign a value to each
                // plot below by replacing 'Close[0]' with your own formula.
    			DrawLine("Upper", true, 0, Close[0] + 10 * TickSize, 0, Close[0] + 10 * TickSize, Color.Transparent, DashStyle.Solid, 1);
    			DrawLine("Lower", true, 0, Close[0] - 10 * TickSize, 0, Close[0] - 10 * TickSize, Color.Transparent, DashStyle.Solid, 1);
            }
    Add this indicator to a chart and set the data series to autoscale false.

    Now attempt to expand or contract the Y axis scaling using the mouse drag. What I am experiencing is that the first mouse drag works, and the second causes the scale to expand dramatically. There are no errors noted in the log.

    #2
    drmartell, I just tried this out following your steps and I was able to scale the chart without incident.
    AustinNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    155 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    90 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    137 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    130 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    107 views
    0 likes
    Last Post CarlTrading  
    Working...
    X