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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    571 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    330 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    548 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    548 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X