Skip to content

SymbolTickEventArgs

Summary

Provides data for the symbol tick event.

Signature

1
public class SymbolTickEventArgs

Namespace

cAlgo.API

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
 using cAlgo.API;
 namespace cAlgo
 {
     // This example shows how to use the SymbolTickEventArgs
     [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
     public 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)
         {
         }
     }
 }
1
2
3
4
5
6
7
8
 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}")

See Also

Properties

SymbolName

Summary

Gets the symbol name.

Signature

1
public string SymbolName {get;}

Return Value

string

Bid

Summary

Gets the bid price.

Signature

1
public double Bid {get;}

Return Value

double

Ask

Summary

Gets the ask price.

Signature

1
public double Ask {get;}

Return Value

double

Symbol

Summary

Gets the symbol.

Signature

1
public Symbol Symbol {get;}

Return Value

Symbol