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

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.
    Chris L.NinjaTrader Customer Service

    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 helpwanted, Today, 03:06 AM
      1 response
      10 views
      0 likes
      Last Post sarafuenonly123  
      Started by Brevo, Today, 01:45 AM
      0 responses
      9 views
      0 likes
      Last Post Brevo
      by Brevo
       
      Started by aussugardefender, Today, 01:07 AM
      0 responses
      5 views
      0 likes
      Last Post aussugardefender  
      Started by pvincent, 06-23-2022, 12:53 PM
      14 responses
      242 views
      0 likes
      Last Post Nyman
      by Nyman
       
      Started by TraderG23, 12-08-2023, 07:56 AM
      9 responses
      387 views
      1 like
      Last Post Gavini
      by Gavini
       
      Working...
      X