Below is the code for an indicator which plots the volume histogram with a dot that projects end of bar volume. It compiles ok, but when I add it to a chart all I get is the pane. No volume and no indicator. I used the NT help file tutorial as a guide, I'm very new at this. Any ideas?
///<summary>
/// This method is used to configure the indicator and is called once before any bar data is loaded.
///</summary>
protectedoverridevoid Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Dot, "PRV"));
CalculateOnBarClose = false;
Overlay = false;
PriceTypeSupported = false;
}
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
double perCom = Bars.PercentComplete;
double volPRV = (1/perCom)*(Volume[0]);
PRV.Set(volPRV);
}
Comment