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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    31 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    12 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    18 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    20 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X