Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator with plots on both price and panel and subgraph

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

    Indicator with plots on both price and panel and subgraph

    hi,

    is it possible to have an indicator with different plots, some of which plot on the screen overlaid on price and other plots in the subgraph below ?

    thanks

    #2
    Hello buylosellhi,

    Unfortunately this is not possible. Indicators are applied to one panel only.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Controling which panel a Drawing Plots to

      I am just now beginning to create an indicator that plots a line between peaks of an indicator. The code I have shown below is just the start as i slowly work it out. The problem is, it is plotting on the price pannel, not on the indicator panel even though I set the indicator settings to plot to panel #2. Also, within the code I have set Overlay = false;

      here is my code for reference. how do I get this thing to plot to the indicator panel?

      Code:
          [Description("DETECTS DIVERGENCE")]
          public class DIVERGENCE : Indicator
          {
              #region Variables
      		
      		private DataSeries MCRSeries; //create variable to hold custom dataseries
      		
              #endregion
      
      
              protected override void Initialize()
              {
                  Overlay				= false;		//do not overlay on price
      			
      			MCRSeries = new DataSeries(this); //inititialize MCRSeries to the primary series
              }
      
      
              protected override void OnBarUpdate()
              {
      			if(CurrentBar <= BarsRequired)	//check if enough bars
      				return;
      			
      			int Start = HighestBar(MCRSeries, 25);
      			
      			MCRSeries.Set(RSI(2,3)[0] + RSI(2,3)[1] + RSI(2,3)[2]);
      			
      			DrawLine("tag1", false, Start, MAX(High,10)[10], 0, Close[0], Color.LimeGreen, DashStyle.Dot, 6);
      
              }
      
              #region Properties
              [Browsable(false)]	// this line prevents the data series from being displayed in the indicator properties dialog, do not remove
              [XmlIgnore()]		// this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
              public DataSeries Upper
              {
                  get { return Values[0]; }
              }
      
              [Browsable(false)]	// this line prevents the data series from being displayed in the indicator properties dialog, do not remove
              [XmlIgnore()]		// this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
              public DataSeries Lower
              {
                  get { return Values[1]; }
              }
      
              #endregion
          }

      Comment


        #4
        Hi ShruggedAtlas,

        Originally posted by ShruggedAtlas View Post
        The problem is, it is plotting on the price pannel, not on the indicator panel even though I set the indicator settings to plot to panel #2.
        To draw on the indicator panel, set DrawOnPricePanel = false; in the Indicators Initialize() method.
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by op1031, Yesterday, 05:16 PM
        1 response
        8 views
        0 likes
        Last Post NT-Roland  
        Started by sinpeople, Today, 07:20 AM
        1 response
        3 views
        0 likes
        Last Post NT-Roland  
        Started by Frank1000, Today, 03:05 AM
        1 response
        8 views
        0 likes
        Last Post NT-Roland  
        Started by ntdev, Today, 01:14 AM
        4 responses
        16 views
        0 likes
        Last Post ntdev
        by ntdev
         
        Started by ct, Today, 02:22 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Jason  
        Working...
        X