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

How to set AutoScale False in this indicator

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

    How to set AutoScale False in this indicator

    Hello, im trying to set the "BOX" in to "AUTOSCALE: FALSE"

    Already add the line 106 IsAutoScale = false;


    The indicator says there is not AutoScale

    But the draw objects (box) always set the autoscale On.


    Anyone can help me with this? Thank you!
    Attached Files

    #2
    Hello contrax,

    On line 106 in the file you have provided is a blank line.
    This blank line is below the line:
    IsOverlay = true;

    Have you provided the wrong file?

    Is there a different file where you have set IsAutoScale to false in State.SetDefaults?

    Are you certain you have compiled the script after making the changes?

    Did you add a new instance of the script for the defaults to be pulled?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello contrax,

      On line 106 in the file you have provided is a blank line.
      This blank line is below the line:
      IsOverlay = true;

      Have you provided the wrong file?

      Is there a different file where you have set IsAutoScale to false in State.SetDefaults?

      Are you certain you have compiled the script after making the changes?

      Did you add a new instance of the script for the defaults to be pulled?


      Oh sorry, i edited by myself but didnt save as a .rar file.

      The only difference between the one i edit and that one is in 106 i add:

      *************

      Description = NinjaTrader.Custom.Resource.NinjaScriptIndicatorDe scriptionADL;
      Name = "CongestionBoxBC";
      IsSuspendedWhileInactive = true;
      IsOverlay = true;
      IsAutoScale = false; (this is line 106)
      (this is line 107)
      HighofThree = 0;
      LowofThree = 0;
      firstbar = 0;
      lastbar = 0;
      totalbars = 0;
      trade= 0;


      **********************************

      The file that i upload is the "original" one... I only want the AUTOSCALE set to False for everything.

      Thank you ChelseaB for your reply.

      Comment


        #4
        Hello contrax,

        I was not able to confirm, are you certain you have compiled the script after making the changes?

        Did you add a new instance of the script for the defaults to be pulled?

        Also, is there any template saved for this script?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          I didnt know how to add in a .rar file but i copy it from the Ninjatrader Documents Folder.


          Anyway the only difference between the original that i uploaded in the first post, and this one is the only AUTOSCALE thing. (i upload a photo with a yellow arrow).

          I want to put everything of that indicator AUTOSCALE: FALSE, everything.

          In fact if exist something that i can set in tools or ninjatrader settings all the indicators autoscale false that works too.


          Thank you.

          Edit: Yes, always that i try to change something i Compile it correctly (the sound hear), and then F5 for refresh the chart and thats it... But with this Indicator i cant, the Boxes that draw still with AutoScale True.

          Attached Files

          Comment


            #6
            Hello contrax,

            Defaults are not pulled when you hit F5 to refresh a script.

            Defaults are only pulled when creating a new instance of the script on the chart.

            Did you add a new instance of the script for the defaults to be pulled?

            Also, is there any template saved for this script?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_ChelseaB View Post
              Hello contrax,

              Defaults are not pulled when you hit F5 to refresh a script.

              Defaults are only pulled when creating a new instance of the script on the chart.

              Did you add a new instance of the script for the defaults to be pulled?

              Also, is there any template saved for this script?

              What already i did it:

              1) Hit F5
              2) Remove the Indicator and add in again.
              3) Open a new chart and only add the indicator (by default after compile it, is already autoscale off.. but the object draw bow still autoscale true)


              ***
              there any template saved for this script?

              There is not any template save of the indicator... (i mean i have a template save for the colours.. but i press "restore" and thats it.. the indicator shows autoscale off but the boxes still autoscale on)

              ***


              I only need the BOX (Rectangle Object) to be autoscale false.

              Comment


                #8
                Hello contrax,

                The autoscale of drawing objects are separate from the indicator.

                The drawing objects require their own isAutoScale parameter in the method overloads.

                However, you already have this set to true.

                Draw.Rectangle(this,"Box2"+CurrentBar,true, totalbars+1, Upperboundary,1,Lowerboundary, Brushes.Transparent, demandColor, Opacity2);

                Are you finding that when the chart is in auto scale mode that the rectangles are appearing outside of the rendered chart area?
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_ChelseaB View Post
                  Hello contrax,

                  The autoscale of drawing objects are separate from the indicator.

                  The drawing objects require their own isAutoScale parameter in the method overloads.

                  However, you already have this set to true.

                  Draw.Rectangle(this,"Box2"+CurrentBar,true, totalbars+1, Upperboundary,1,Lowerboundary, Brushes.Transparent, demandColor, Opacity2);

                  Are you finding that when the chart is in auto scale mode that the rectangles are appearing outside of the rendered chart area?

                  Exactly "The drawing objects require their own isAutoScale parameter in the method overloads."

                  I was thinking about it, and looking in the editor where i can change that.


                  Im going to upload 2 pictures, with the Autoscale: True.

                  And if i manually take it off, (Autoscale: False)


                  I was trying to find where it can show better the difference between TRUE and False... But when the Rectangle is at the top and the price is very at the bottom.. the Candles are very small because the Rectangle autoscale is true... I want everything AutoScale: False.



                  Edit: Those picture doesnt show what i mean... but i think u understand me.


                  Comment


                    #10
                    Hello contrax,

                    Currently, you are supplying true as the isAutoScale parameter to the drawing object.

                    To confirm, you want this to be false?

                    In this case supply a false as the isAutoScale parameter to the drawing object.
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      This is other example about True and False "AutoScale"

                      I want to be "FALSE" in everything related of AutoScale. Because for me the more important thing is the Candlestick and not the indicators.

                      Sometimes are examples where the candles are very small because the Rectangle are at the very top or at the very bottom and because the problem of "AutoScale" the Chart adjust for the Rectangle causing the candlestick very small...

                      In a Few Words:

                      Objects: AutoScale False
                      Indicators: AutoScale False
                      Rectangle: Autoscale False
                      Box: Autoscale False

                      (Sorry for my english and thank you for having time to help me.)

                      Comment


                        #12
                        Hello contrax,

                        If you always want autoscale to be false, then always use a false when using an overload that includes the isAutoScale parameter.

                        The indicator plots are controlled by the indicator's IsAutoScale setting.

                        Drawing objects have their own isAutoScale.

                        Be sure in your code they are both set to false.
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #13
                          Originally posted by NinjaTrader_ChelseaB View Post
                          Hello contrax,

                          If you always want autoscale to be false, then always use a false when using an overload that includes the isAutoScale parameter.

                          The indicator plots are controlled by the indicator's IsAutoScale setting.

                          Drawing objects have their own isAutoScale.

                          Be sure in your code they are both set to false.


                          Im not a Programmer and that Indicator it wasnt created by me.

                          If you can help me in what line should i add the parameter or let me contact the creator of the indicator if He can help me modify it.

                          But if u can help me (in case that is easy) i appreciate it. Thank you!

                          Comment


                            #14
                            Hello contrax,

                            Change the isAutoScale bool from true to false.

                            Draw.Rectangle(NinjaScriptBase owner, string tag, bool isAutoScale, int startBarsAgo, double startY, int endBarsAgo, double endY, Brush brush, Brush areaBrush, intareaOpacity)


                            Draw.Rectangle(this,"Box2"+CurrentBar,true, totalbars+1, Upperboundary,1,Lowerboundary, Brushes.Transparent, demandColor, Opacity2);
                            Chelsea B.NinjaTrader Customer Service

                            Comment


                              #15
                              Originally posted by NinjaTrader_ChelseaB View Post
                              Hello contrax,

                              Change the isAutoScale bool from true to false.

                              Draw.Rectangle(NinjaScriptBase owner, string tag, bool isAutoScale, int startBarsAgo, double startY, int endBarsAgo, double endY, Brush brush, Brush areaBrush, intareaOpacity)


                              Draw.Rectangle(this,"Box2"+CurrentBar,true, totalbars+1, Upperboundary,1,Lowerboundary, Brushes.Transparent, demandColor, Opacity2);

                              THANK YOU VERY MUCH!!! THATS IT!

                              Thank you and i appreciate the time that u give me to fix this in the way that i want.

                              Have an excellent new year! Cheers!

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by ScottWalsh, Today, 06:52 PM
                              4 responses
                              32 views
                              0 likes
                              Last Post ScottWalsh  
                              Started by olisav57, Today, 07:39 PM
                              0 responses
                              4 views
                              0 likes
                              Last Post olisav57  
                              Started by trilliantrader, Today, 03:01 PM
                              2 responses
                              19 views
                              0 likes
                              Last Post helpwanted  
                              Started by cre8able, Today, 07:24 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post cre8able  
                              Started by Haiasi, Today, 06:53 PM
                              1 response
                              4 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Working...
                              X