Chart Description Text - provides a description text box at the top left corner
public class ChartDescriptionText : Indicator
{
#region Variables
private string chartDesc = "";
private Font myFont = new Font("Arial", 20);
#endregion
protected override void Initialize()
{
Overlay = true;
}
protected override void OnBarUpdate()
{
if (CurrentBar < 1)
return;
DrawTextFixed("tag1Flag", chartDesc, TextPosition.TopLeft, Color.White, myFont, Color.Transparent, Color.DimGray, 5);
}
#region Properties
[Description("")]
[GridCategory("Parameters")]
public string ChartDesc
{
get { return chartDesc; }
set { chartDesc = value; }
}
#endregion
}
{
#region Variables
private string chartDesc = "";
private Font myFont = new Font("Arial", 20);
#endregion
protected override void Initialize()
{
Overlay = true;
}
protected override void OnBarUpdate()
{
if (CurrentBar < 1)
return;
DrawTextFixed("tag1Flag", chartDesc, TextPosition.TopLeft, Color.White, myFont, Color.Transparent, Color.DimGray, 5);
}
#region Properties
[Description("")]
[GridCategory("Parameters")]
public string ChartDesc
{
get { return chartDesc; }
set { chartDesc = value; }
}
#endregion
}
Comments
Post a Comment