Category Trend  Published on 27/02/2020

Snapshot

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: 1188
  • Modified: 13/10/2021 09:54
Comments
Log in to add a comment.
VE
venomdoli4 · 1 year ago

Some users asked how to get fortnite skins get free fortnite skins i hope you can easy to understand.