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 Hwop38, 05-04-2026, 07:02 PM
    0 responses
    164 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    319 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    246 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    350 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    179 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X