Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Autoscale

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

    Autoscale

    Hello,

    as I have coded a new indicator with many lines that are all eg with Draw.Line(this,"A9", true,...) chart is squeezing often.

    I want to ask if check/uncheck in parameters of the indicator does overwrite Draw.Line (...true/false...) or if one has to change all in the code.

    (I know it can be done by quick replace, but I´d like to know)

    Thank you!
    Toony

    #2
    Hello tonynt,

    Thank you for the post.

    All draw object methods have an "isAutoScale" parameter in the constructor. e.g:

    Code:
    Draw.Line(NinjaScriptBase owner, string tag, [B]bool isAutoScale[/B], int startBarsAgo, double startY, int endBarsAgo, double endY, Brush brush, DashStyleHelper dashStyle,int width)
    If the lines are causing the data to be "crushed" or "squeezed", turn that to false for all draw object calls. Setting the properties through the UI will work, but they those changes will be gone next time the script is loaded.

    Please let me know if this does not resolve your inquiry.

    Comment


      #3
      In the Indicator on SetDefault Section

      add this

      IsAutoScale = false;

      also in your lines keep autoscale to false, then you won't have any issues

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      637 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      366 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      107 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      569 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      571 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X