Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicators

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

    Indicators

    How can I lay an indicator over another indicator?

    #2
    Hello bob g,

    To overlay indicators you can simply apply each one & (depending on their scale(s)) you can “overlay” them by applying them to the same Chart Panel.

    You will want to check out the “Working with Indicators” section of the NinjaTrader 7 Help Guide for more information on this topic:


    Please let me know if I can answer any additional questions.
    ChipNinjaTrader Customer Service

    Comment


      #3
      Indicator overlaying another indicator: Custom Indicator Questions - NT7B19

      Hello:
      I have reviewed this thread and all tutorials related to it. However, there are several questions that I feel haven't been answered. Here is a custom indicator example:

      4 Indicators: (e.g., Range, ATR, Volume, and VOLMA).

      1) How does one specify that Range and ATR overlay on Chart Panel 2, while Volume and VOLMA overlay on Chart Panel 3? The manual doesn't specify the code to handle this situation, and only the last 2 (Volume and VOLMA) are displayed on panel 2.

      2) Empty Panel: If I have specified all variables as DataSeries variables and commented out the plots in the script, I shouldn't have an "empty" panel at the bottom of a chart when I load the indicator. The values for the DataSeries variables are correct in the data box. Is there a way to ensure there are no empty panels?

      3) Is there a way to specify a specific panel for an indicator when using the indicator wizard?

      Thanks.

      Tony

      Comment


        #4
        Tony,

        Your question is in relation to strategy code I suspect. To choose which panel indicators reside on you will need to use techniques shown in this tip with the .Panel property: http://www.ninjatrader.com/support/f...ead.php?t=3228

        From there you will be able to add the indicators that you want on the same panel onto the same panel. If you need certain ones on different scale justifications then you can use the ScaleJustification property to achieve what you need. http://www.ninjatrader.com/support/h...tification.htm

        2. If your indicator has no plots you should put the indicator on the price panel instead of its own panel. To do so in Initialize() add "Overlay = true;".

        3. This is not possible. You do not choose which panel the indicators go on except when you add the indicator.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Indicator Overlaying Another Indicator: Custom Indicator NOT Custom Strategy

          Hello Josh:

          The problem is with building a custom Indicator NOT a strategy. I added the indicator code for the 4 indicators and the values come out correct. However, the problem is applying data (e.g., Vol and VOLMA) to a certain panel. This would be easy in a strategy, as all you have to do is add the indicators. Any ideas?

          Tony

          Comment


            #6
            Indicators cannot add other indicators. Each indicator is added separately. If you want to add VOL and VOLMA onto the same panel just select the same panel for them. This cannot be programmed. You cannot predetermine what panel an indicator is going to reside on besides the price panel. If you want it on the price panel you will have to type in Overlay = true. Otherwise each new indicator will by default be added to a new panel.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Hello Josh:

              I have the code for 4 indicators (Range, ATR, Vol, and VOLMA) in my custom indicator. By your previous statement there should be 4 panels below the price chart. In the Initialize area I have the following:

              Add(new Plot(Color.Green, "ATR")); // ATR
              Add(new Plot(Color.Firebrick, PlotStyle.Bar, "Range")); // Range
              Add(new Plot(new Pen(Color.Blue, 2), PlotStyle.Bar, "Volume")); // Volume
              Add(new Line(Color.DarkGray, 0, "Zero line")); // Volume
              Add(new Plot(Color.DarkOrange, "VOLMA")); // VolMA
              Overlay = false;

              However, all variables are displayed in panel 2. There is no panel 2 - 5. What am I missing? How do I ensure, at least, they all appear on a separate panel?

              Thanks.
              Tony

              Comment


                #8
                Tony,

                No, that would not make 4 panels. An indicator only populates one panel at a time. A single indicator will not populate multiple panels. Add multiple plots in the Initialize() method just means this indicator has 4 plots in the panel it will use. Just because you set different indicators to the values of those plots does not mean you are adding those indicators. It just means the indicator plot has the same value as those other indicators.

                To recap, a single indicator cannot use multiple panels.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Thanks Josh:

                  An indicator is an indicator is and indicator.

                  Tony

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Ludwik, Today, 03:52 AM
                  0 responses
                  2 views
                  0 likes
                  Last Post Ludwik
                  by Ludwik
                   
                  Started by wuannetraam, Today, 02:40 AM
                  0 responses
                  8 views
                  0 likes
                  Last Post wuannetraam  
                  Started by cyberpete76, 03-27-2023, 12:29 AM
                  7 responses
                  269 views
                  1 like
                  Last Post slightly  
                  Started by renewsaltwater, Today, 01:15 AM
                  0 responses
                  2 views
                  0 likes
                  Last Post renewsaltwater  
                  Started by slightly, Today, 12:49 AM
                  0 responses
                  4 views
                  0 likes
                  Last Post slightly  
                  Working...
                  X