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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      70 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      152 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      100 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      288 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X