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

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 kujista, Today, 05:44 AM
        0 responses
        1 view
        0 likes
        Last Post kujista
        by kujista
         
        Started by ZenCortexCLICK, Today, 04:58 AM
        0 responses
        5 views
        0 likes
        Last Post ZenCortexCLICK  
        Started by sidlercom80, 10-28-2023, 08:49 AM
        172 responses
        2,281 views
        0 likes
        Last Post sidlercom80  
        Started by Irukandji, Yesterday, 02:53 AM
        2 responses
        18 views
        0 likes
        Last Post Irukandji  
        Started by adeelshahzad, Today, 03:54 AM
        0 responses
        8 views
        0 likes
        Last Post adeelshahzad  
        Working...
        X