Skip to content

SymbolTickEventArgs

class cAlgo.API

DesktopCLICloud

Provides data for the symbol tick event.

Definition

public class SymbolTickEventArgs

Namespace: cAlgo.API · Group: EventArgs

Examples

using cAlgo.API;

namespace cAlgo
{
    // This example shows how to use the SymbolTickEventArgs
    public partial class SymbolTickEventArgsSample : Indicator
    {
        protected override void Initialize()
        {
            Symbol.Tick += OnSymbolTick;
        }

        private void OnSymbolTick(SymbolTickEventArgs obj)
        {
            Print("Symbol: {0} | Ask: {1} | Bid: {2}", obj.SymbolName, obj.Ask, obj.Bid);
        }

        public override void Calculate(int index)
        {
        }
    }
}
import clr
clr.AddReference("cAlgo.API")

from cAlgo.API import *

class Test():
    def initialize(self):
        api.Symbol.Tick += self.on_symbol_tick

    def on_symbol_tick(self, args):
        print(f"Symbol: {args.SymbolName} | Ask: {args.Ask} | Bid: {args.Bid}")
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true
}

Properties

Name Description
AskDesktopCLIClouddouble Gets the ask price.
BidDesktopCLIClouddouble Gets the bid price.
SymbolDesktopCLICloudSymbol Gets the symbol.
SymbolNameDesktopCLICloudstring Gets the symbol name.

See also