---
id: "T:cAlgo.API.ChartStaticText"
kind: "interface"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# ChartStaticText (interface)

Represents the chart static text.

Environments: Desktop supported · CLI works differently · Cloud works differently.

- CLI: Created and kept with all its properties, but never drawn: the CLI displays no chart.
- Cloud: Created and kept with all its properties, but never drawn: the cloud displays no chart.

## Definition

```csharp
public interface ChartStaticText
```

## Examples

C#:

```csharp
using cAlgo.API;
using System.Text;

namespace cAlgo
{
    // This sample shows how to use Chart.DrawStaticText method to draw static locked text on chart
    public partial 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)
        {
        }
    }
}
```

Python:

```python
import clr
clr.AddReference("cAlgo.API")

from cAlgo.API import *

class Test():
    def initialize(self):
        text = f"Symbol: {api.SymbolName}\nTimeFrame: {api.TimeFrame}\nChart Type: {api.Chart.ChartType}"
        api.Chart.DrawStaticText("Static_Sample", text, VerticalAlignment.Bottom, HorizontalAlignment.Left, Color.Red)
```

config.json:

```json
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true
}
```

## Properties

- `Color Color {get; set;}` — Gets or sets the chart static text color. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/Color/index.md)
- `string FontFamily {get; set;}` — Gets or sets the font style of the text. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/FontFamily/index.md)
- `double FontSize {get; set;}` — Gets or sets the font size of text [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/FontSize/index.md)
- `HorizontalAlignment HorizontalAlignment {get; set;}` — Gets or sets the chart static text horizontal alignment. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/HorizontalAlignment/index.md)
- `bool IsBold {get; set;}` — Gets or sets if the text is Bold or not [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/IsBold/index.md)
- `bool IsItalic {get; set;}` — Gets or sets if the text is Italic or not [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/IsItalic/index.md)
- `bool IsUnderlined {get; set;}` — Gets or sets if the text is Underlined or not [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/IsUnderlined/index.md)
- `string Text {get; set;}` — Gets or sets the chart static text content. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/Text/index.md)
- `VerticalAlignment VerticalAlignment {get; set;}` — Gets or sets the chart static text vertical alignment. [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartStaticText/VerticalAlignment/index.md)

## Inherited members

- `string Name {get;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/Name/index.md)
- `string Comment {get; set;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/Comment/index.md)
- `ChartObjectType ObjectType {get;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/ObjectType/index.md)
- `bool IsInteractive {get; set;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsInteractive/index.md)
- `bool IsLocked {get; set;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsLocked/index.md)
- `bool IsHidden {get; set;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsHidden/index.md)
- `int ZIndex {get; set;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/ZIndex/index.md)
- `bool IsAlive {get;}` (from ChartObject) [details](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartObject/IsAlive/index.md)

