Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

plot specific volume size

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

    plot specific volume size

    Hi
    I am using tick chart when a particular size volume appears the indicator should plot a dot above it say I want to plot a Red Dot above ticks which has volume equal to 550.
    I am trying to modify High Volume Indicator,but I get the error on compiling "SpecificVolume,member names can not be same as their enclosing types"
    plz help
    HTML Code:
    public class Specific Volume : Indicator
    	{
    		#region Variables
    		// Wizard generated variables
    		private int SpecificVolume = 550; // Default setting for SpecificVolume
    		private Color SpecificAlert = Color.Gold;
    		
    		// User defined variables (add any user defined variables below)
    		#endregion
    		
    		/// <summary>
    		/// This method is used to configure the indicator and is called once before any bar data is loaded.
    		/// </summary>
    		protected override void Initialize()
    		{
    			Add(new Plot(new Pen(Color.Blue, 2), PlotStyle.Bar, "Volume"));
    			Add(new Line(Color.DarkGray, 0, "Zero line"));
    			
    			
    		}
    
    		/// <summary>
    		/// Called on each bar update event (incoming tick)
    		/// </summary>
    		protected override void OnBarUpdate()
    		{
    			Value.Set(Volume[0]);
    		
                if (Volume[0] = SpecificVolume)
    			{
    				
    				DrawDot("VolDot" + CurrentBar,true, 0, High[0] + 5*TickSize, highAlert);
    				
    			}
    			
    			
    		
    			
    							           
    		}
    Last edited by SLASH; 03-03-2013, 12:15 AM.

    #2
    It looks like you may have some syntax errors.

    I would suggest deleting this indicator and starting by opening the VOL indicator

    Right click it -> Save as -> name it something like VOLDot

    then you can add your custom OnBarUpdate() logic.

    Also I see you're trying to use color as input, please read this first: http://www.ninjatrader.com/support/f...ead.php?t=4977

    It also looks like highAlert is never defined.

    Let me know if I can be of further assistance.
    LanceNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    607 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    353 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    560 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    561 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X