Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to change the "scale justification"?

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

    How to change the "scale justification"?

    Hello,
    I add an indicator to a strategy Add(Indi).
    How can I change in script the "scale justification" of this indicator?

    Baruch

    #2
    Hello Baruch,

    Thank you for your post.

    You will use the ScaleJustification property. For information on this item please visit the following link: http://www.ninjatrader.com/support/h...tification.htm

    For information on plotting from within a strategy please visit the following link: http://www.ninjatrader.com/support/f...ead.php?t=6651

    Please let me know if you have any questions.

    Comment


      #3
      Patrick hi,
      You did not unswer my question. The examples you showed are not the unswer.
      I'll try once more:
      In a STRATEGY in Initialize I want to add an RSI indicator.
      If I want to change the the plot collor I put:
      RSI(14,3).Plots[0].Pen.Color = Color.XXX;
      If I want to move a line I put:
      RSI(14,3).Lines[0].Value =77;
      And then Add (RSI(14,3));

      How to change the justification!!!!!!!!!!!!!!!!!!!!!!!

      Regards,
      Baruch

      Comment


        #4
        Originally posted by Baruch View Post
        Patrick hi,
        You did not unswer my question. The examples you showed are not the unswer.
        I'll try once more:
        In a STRATEGY in Initialize I want to add an RSI indicator.
        If I want to change the the plot collor I put:
        RSI(14,3).Plots[0].Pen.Color = Color.XXX;
        If I want to move a line I put:
        RSI(14,3).Lines[0].Value =77;
        And then Add (RSI(14,3));

        How to change the justification!!!!!!!!!!!!!!!!!!!!!!!

        Regards,
        Baruch
        Same procedure. The ScaleJustification is a property, so you just use the standard dot-delineated call.
        Code:
         
        RSI(14,3).ScaleJustification = ScaleJustification.Left; //or whatever is your pleasure.

        Comment


          #5
          Hi Koganam,
          It should be the obvious solution, but it gives an error. "The name "ScaleJustification" does not exist in the current context."

          Comment


            #6
            Originally posted by Baruch View Post
            Hi Koganam,
            It should be the obvious solution, but it gives an error. "The name "ScaleJustification" does not exist in the current context."
            You may have a typo? I cannot tell you how many times I have come a cropper on that very issue.

            This is what I have in my Initialize() method in my test file. It compiled fine. I am even willing to give you a demo over TeamViewer, so that you can see for yourself.
            Code:
            [FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]protected [/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]override [/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]void[/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New] Initialize()[/FONT]
            [FONT=Courier New]{[/FONT]
            [FONT=Courier New]CalculateOnBarClose = [/FONT][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]true[/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New];[/FONT]
            [FONT=Courier New]Add (RSI([/FONT][FONT=Courier New][COLOR=#800080][FONT=Courier New][COLOR=#800080]14[/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New],[/FONT][FONT=Courier New][COLOR=#800080][FONT=Courier New][COLOR=#800080]3[/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New]));[/FONT]
            [FONT=Courier New]RSI([/FONT][FONT=Courier New][COLOR=#800080][FONT=Courier New][COLOR=#800080]14[/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New],[/FONT][FONT=Courier New][COLOR=#800080][FONT=Courier New][COLOR=#800080]3[/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New]).ScaleJustification = ScaleJustification.Left;[/FONT]
            [FONT=Courier New]}[/FONT]
            Last edited by koganam; 02-05-2013, 07:35 AM. Reason: Corrected spelling.

            Comment


              #7
              Hi Koganam,
              Thanks. You are right on a new strategy it works, but copy/paste into my strategy I get that error. So I need to streep the strategy until I find why or if there is a posibility to state explisitly the context? (Indicator?)

              Regards,
              Baruch

              Comment


                #8
                Originally posted by Baruch View Post
                Hi Koganam,
                Thanks. You are right on a new strategy it works, but copy/paste into my strategy I get that error. So I need to streep the strategy until I find why or if there is a posibility to state explisitly the context? (Indicator?)

                Regards,
                Baruch
                You can use a named instance, but it should not make a difference with direct access to properties, just with how NT finds it to call it during processing.

                Comment


                  #9
                  Believe it or not but I was missing Gui.Chart in declarations.
                  Never had a problem with any NT statements until now.
                  So thanks for showing me the way.

                  Baruch

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  672 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  379 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  111 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  576 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  582 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X