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 nicthe, Today, 09:24 AM
      1 response
      5 views
      0 likes
      Last Post nicthe
      by nicthe
       
      Started by samish18, Today, 10:13 AM
      0 responses
      4 views
      0 likes
      Last Post samish18  
      Started by kenz987, Yesterday, 10:20 AM
      2 responses
      13 views
      0 likes
      Last Post kenz987
      by kenz987
       
      Started by nicthe, 08-23-2023, 07:53 AM
      7 responses
      197 views
      0 likes
      Last Post nicthe
      by nicthe
       
      Started by stalt, 12-28-2015, 01:36 PM
      6 responses
      1,536 views
      0 likes
      Last Post giulyko00  
      Working...
      X