Skip to content

ChartTemplateColorSettings

interface cAlgo.API Since 5.6

DesktopCLICloud

Represents the chart template Color Settings.

Environment behaviour

Cloud — not supported. Never available in the cloud: it is only returned by members that do not work there (ChartTemplate.ColorSettings).

Definition

public interface ChartTemplateColorSettings

Namespace: cAlgo.API · Group: Templates

Examples

using cAlgo.API;

namespace cAlgo.Robots;

public partial class ChartTemplate : Robot
{
    protected override void OnStart()
    {
        var template = ChartTemplates.Get("Template Name");

        if (template is null)
        {
            Print("Template not found");
            return;
        }

        template.ColorSettings.AskPriceLineColor = Color.Red;
        template.ColorSettings.BidPriceLineColor = Color.Red;
        template.ColorSettings.BackgroundColor = Color.Red;
        template.ColorSettings.BearFillColor = Color.Red;
        template.ColorSettings.BearOutlineColor = Color.Red;
        template.ColorSettings.BullFillColor = Color.Red;
        template.ColorSettings.BullOutlineColor = Color.Red;
        template.ColorSettings.BuyColor = Color.Red;
        template.ColorSettings.ForegroundColor = Color.Red;
        template.ColorSettings.GridLinesColor = Color.Red;
        template.ColorSettings.LosingDealColor = Color.Red;
        template.ColorSettings.PeriodSeparatorColor = Color.Red;
        template.ColorSettings.SellColor = Color.Red;
        template.ColorSettings.TickVolumeColor = Color.Red;
        template.ColorSettings.WinningDealColor = Color.Red;
        template.ColorSettings.AreaFillColor = Color.Red;
    }
}
import clr

clr.AddReference("cAlgo.API")

# Import cAlgo API types
from cAlgo.API import *

# Import trading wrapper functions
from robot_wrapper import *

class Test():
    def on_start(self):
        template = api.ChartTemplates.Get("Template Name")

        if template is None:
            print("Template not found")
            return

        template.ColorSettings.AskPriceLineColor = Color.Red
        template.ColorSettings.BidPriceLineColor = Color.Red
        template.ColorSettings.BackgroundColor = Color.Red
        template.ColorSettings.BearFillColor = Color.Red
        template.ColorSettings.BearOutlineColor = Color.Red
        template.ColorSettings.BullFillColor = Color.Red
        template.ColorSettings.BullOutlineColor = Color.Red
        template.ColorSettings.BuyColor = Color.Red
        template.ColorSettings.ForegroundColor = Color.Red
        template.ColorSettings.GridLinesColor = Color.Red
        template.ColorSettings.LosingDealColor = Color.Red
        template.ColorSettings.PeriodSeparatorColor = Color.Red
        template.ColorSettings.SellColor = Color.Red
        template.ColorSettings.TickVolumeColor = Color.Red
        template.ColorSettings.WinningDealColor = Color.Red
        template.ColorSettings.AreaFillColor = Color.Red
{
  "AccessRights": "None",
  "AddIndicators": true
}

Properties

Name Description
AreaFillColorDesktopCLICloudColor Gets or sets the color of area chart fill.
AskPriceLineColorDesktopCLICloudColor Gets or sets the color of the ask price line.
BackgroundColorDesktopCLICloudColor Gets or sets the color of the chart background.
BearFillColorDesktopCLICloudColor Gets or sets the color of the bear candle fill.
BearOutlineColorDesktopCLICloudColor Gets or sets the color of the bear candle or bar outline.
BidPriceLineColorDesktopCLICloudColor Gets or sets the color of the bid price line.
BullFillColorDesktopCLICloudColor Gets or sets the color of the bull candle fill.
BullOutlineColorDesktopCLICloudColor Gets or sets the color of the bull candle or bar outline.
BuyColorDesktopCLICloudColor Gets or sets the color of Buy positions and orders.
ForegroundColorDesktopCLICloudColor Gets or sets the color of the chart foreground.
GridLinesColorDesktopCLICloudColor Gets or sets the color of the grid lines.
LosingDealColorDesktopCLICloudColor Gets or sets the color of the losing deal.
PeriodSeparatorColorDesktopCLICloudColor Gets or sets the color of the period separator.
SellColorDesktopCLICloudColor Gets or sets the color of Sell order positions and orders.
TickVolumeColorDesktopCLICloudColor Gets or sets the color of the tick volume.
WinningDealColorDesktopCLICloudColor Gets or sets the color of the winning deal.

See also