Skip to content

ChartStaticText

Summary

Represents the chart static text.

Signature

1
public abstract interface ChartStaticText

Namespace

cAlgo.API

Properties

Name Description
Color { get; set; } Gets or sets the chart static text color.
Text { get; set; } Gets or sets the chart static text content.
VerticalAlignment { get; set; } Gets or sets the chart static text vertical alignment.
HorizontalAlignment { get; set; } Gets or sets the chart static text horizontal alignment.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
 using cAlgo.API;
 using System.Text;
 namespace cAlgo
 {
     // This sample shows how to use Chart.DrawStaticText method to draw static locked text on chart
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public class ChartStaticTextSample : Indicator
     {
         protected override void Initialize()
         {
             var stringBuilder = new StringBuilder();
             stringBuilder.AppendLine("Symbol: " + SymbolName);
             stringBuilder.AppendLine("TimeFrame: " + TimeFrame);
             stringBuilder.AppendLine("Chart Type: " + Chart.ChartType);
             Chart.DrawStaticText("Static_Sample", stringBuilder.ToString(), VerticalAlignment.Bottom, HorizontalAlignment.Left, Color.Red);
         }
         public override void Calculate(int index)
         {
         }
     }
 }

Last update: June 26, 2022

Comments