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

scale in the left side of the graph

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

    scale in the left side of the graph

    Hi,

    I have an indicator where I need to plot three lines. Two lines at the same price panel, and the scale of a line should be in the left side of the graph, and the second line on the right of the graph. The third line should be in another panel, in the Panel 1.

    How can I put a scale to the left of the graph and how can I insert the third line in Panel 1?

    Thank You

    #2
    Hello sasil,

    Thank you for writing in.

    Unfortunately, an indicator cannot plot in more than one panel. If you wish to plot into an additional panel, you will need to create another indicator just for that extra panel.

    To change the position of the scale, right-click on your chart and select Indicators.

    Select the indicator you wish to modify and change the "Scale justification" to Left.

    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Thank You for your prompt response.

      Ok, It is not possible to plot in more than one panel, but is there any way I could indicate that the scale line should be on the left side? Can I write that in the code of the indicator?

      Comment


        #4
        Hello sasil,

        To change the position of the scale, right-click on your chart and select Indicators.

        Select the indicator you wish to modify and change the "Scale justification" to Left.

        You can modify the ScaleJustification property in Initialize() to do this programmatically: https://ninjatrader.com/support/help...tification.htm

        Please, let us know if we may be of further assistance.
        Zachary G.NinjaTrader Customer Service

        Comment


          #5
          Hi,
          I tried it, but is not working. Now, in my indicator, I have five lines. I want to put the scale of the three lines on the right side of the graph, and the scale of two lines on the left side of the graph.

          I am using :

          protected override void Initialize()
          {
          ScaleJustification = ScaleJustification.Right;
          Add(new Plot(new Pen(Color.FromKnownColor(KnownColor.DarkOrange),2) , PlotStyle.Line, "Line1"));
          Add(new Plot(new Pen(Color.FromKnownColor(KnownColor.Black),2), PlotStyle.Line, "Line2"));
          Add(new Plot(new Pen(Color.FromKnownColor(KnownColor.Purple),2), PlotStyle.Line, "Line3"));
          ScaleJustification = ScaleJustification.Left;
          Add(new Plot(new Pen(Color.FromKnownColor(KnownColor.Green),2), PlotStyle.Line, "DIF1"));
          Add(new Plot(new Pen(Color.FromKnownColor(KnownColor.Red),2), PlotStyle.Line, "DIF2"));
          Overlay = true;
          CalculateOnBarClose = false;
          }

          The scale of Line1, Line2 and Line3 on the right side, and DIF1 and DIF2 on left side of the graph.

          What is wrong? How can I do this?

          Thank you

          Comment


            #6
            Hello sasil,

            You cannot have two different scale justifications for different plots on your indicator. They must all follow the same scale justification.

            If you wish to have different scale justifications, you will need to have multiple indicators, each with the specific scale justification you want. So, for example, one indicator for the three plots and another for the two plots.
            Zachary G.NinjaTrader Customer Service

            Comment


              #7
              OK, Thank you...

              Comment


                #8
                I can call a window inside another window, just to plot on another scale or another panel? Or, call a strategy inside an indicator, where this strategy would only have to plot two or three indicators?

                Comment


                  #9
                  sorry,
                  I can call a indicator inside another indicator, just to plot on another scale or another panel? Or, call a strategy inside an indicator, where this strategy would only have to plot two or three indicators?

                  Comment


                    #10
                    Hello sasil,

                    You can have multiple indicators plot into the same panel if desired.

                    I'm not sure what you mean by calling a strategy from an indicator; strategies can call an indicator to plot on the chart, but an indicator can't call a strategy.
                    Zachary G.NinjaTrader Customer Service

                    Comment


                      #11
                      Thanks for your response

                      That was what I wanted, an indicator calling a strategy. That's not possible.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by frankthearm, Today, 09:08 AM
                      6 responses
                      24 views
                      0 likes
                      Last Post frankthearm  
                      Started by maybeimnotrader, Yesterday, 05:46 PM
                      3 responses
                      23 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by adeelshahzad, Today, 03:54 AM
                      5 responses
                      33 views
                      0 likes
                      Last Post NinjaTrader_BrandonH  
                      Started by stafe, 04-15-2024, 08:34 PM
                      7 responses
                      32 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by merzo, 06-25-2023, 02:19 AM
                      10 responses
                      823 views
                      1 like
                      Last Post NinjaTrader_ChristopherJ  
                      Working...
                      X