Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 mmenigma, Yesterday, 03:25 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by kujista, Today, 05:44 AM
    0 responses
    6 views
    0 likes
    Last Post kujista
    by kujista
     
    Started by ZenCortexCLICK, Today, 04:58 AM
    0 responses
    9 views
    0 likes
    Last Post ZenCortexCLICK  
    Started by sidlercom80, 10-28-2023, 08:49 AM
    172 responses
    2,281 views
    0 likes
    Last Post sidlercom80  
    Started by Irukandji, Yesterday, 02:53 AM
    2 responses
    18 views
    0 likes
    Last Post Irukandji  
    Working...
    X