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

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 algospoke, Yesterday, 06:40 PM
    2 responses
    19 views
    0 likes
    Last Post algospoke  
    Started by ghoul, Today, 06:02 PM
    3 responses
    14 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by jeronymite, 04-12-2024, 04:26 PM
    3 responses
    45 views
    0 likes
    Last Post jeronymite  
    Started by Barry Milan, Yesterday, 10:35 PM
    7 responses
    20 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by AttiM, 02-14-2024, 05:20 PM
    10 responses
    181 views
    0 likes
    Last Post jeronymite  
    Working...
    X