Description
チャートの右上に通貨ペアと時間足の種類を表示します。
In the upper right corner of the chart, you can see the currency pair and the type of timeframe.
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
namespace cAlgo
{
[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class ChartInformation : Indicator
{
protected override void Initialize()
{
string timeFrame = Chart.TimeFrame.ToString();
timeFrame = timeFrame.Replace("Minute", "M");
timeFrame = timeFrame.Replace("Hour", "H");
timeFrame = timeFrame.Replace("Daily", "D");
switch (timeFrame)
{
case "M":
timeFrame = "M1";
break;
case "H":
timeFrame = "H1";
break;
case "D":
timeFrame = "D1";
break;
}
string text = Chart.SymbolName.ToString() + " " + timeFrame;
Chart.DrawStaticText("Chart Info", text, VerticalAlignment.Top, HorizontalAlignment.Right, Color.White);
}
public override void Calculate(int index)
{
}
}
}
summer
Joined on 10.08.2020
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: Chart Information.algo
- Rating: 5
- Installs: 1513
- Modified: 13/10/2021 09:55
Note that publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section, please use the Copyright Infringement Notification form to submit a claim.
Comments
Log in to add a comment.
Hello, thank you for this indicator. Is it possible to add options for increasing the symbol size, and moving it on other chart corner?