Description
Tradingview-like market snapshot
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 Snapshot : Indicator
{
protected override void Initialize()
{
Chart.MouseMove += OnChartMouseMove;
}
void OnChartMouseMove(ChartMouseEventArgs obj)
{
Bar b = Bars[(int)obj.BarIndex];
double direction = b.Close - b.Open;
Chart.DrawStaticText("Snapshot", string.Format("{0} O: {1} H: {2} L: {3} C: {4} V: {5} {6}", SymbolName, b.Open, b.High, b.Low, b.Close, b.TickVolume, b.OpenTime), VerticalAlignment.Top, HorizontalAlignment.Left, direction >= 0 ? Color.FromHex("FF01AF50") : Color.Red);
}
public override void Calculate(int index)
{
// Calculate value at specified index
// Result[index] = ...
}
}
}
CY
cysecsbin.01
Joined on 10.11.2018 Blocked
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: Snapshot.algo
- Rating: 0
- Installs: 1173
- Modified: 13/10/2021 09:54
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.
Some users asked how to get fortnite skins get free fortnite skins i hope you can easy to understand.