Is there no way to delete posts?
Can anyone explain what is incorrect here?
public class VolText : Indicator
{
#region Variables
// Wizard generated variables
private int myInput0 = 1; // Default setting for MyInput0
private System.Drawing.Font txtFont;
private int fontSize = 10;
private double Offset = 2;
private DataSeries myv;
// 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()
{
CalculateOnBarClose = true;
Overlay = false;
PriceTypeSupported = false;
txtFont = new Font("Verdana Ref", fontSize);
new DataSeries (this);
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
myv[0] = Volume[0];
if(Close[0] >= Open[0])
{
DrawText("HighText", false, myv[0].ToString(), 0, High[0]+ (TickSize * Math.Abs( Offset)) ,Color.ForestGreen, txtFont, StringAlignment.Center, Color.Transparent, Color.Transparent, 50);
}
else
{
DrawText("LowText", false, VOL()[0].ToString(), 0,Low[0] - (TickSize*Math.Abs( Offset)),Color.Red, txtFont, StringAlignment.Center, Color.Transparent, Color.Transparent, 50);
}
}

Comment