Skip to content

CustomSymbol

Summary

Represents a custom symbol.

Signature

1
public abstract interface CustomSymbol

Namespace

cAlgo.API

See Also

Methods

UpdateQuote

Summary

Updates current symbol quotes.

Signature

1
public abstract void UpdateQuote(double? bid, double? ask)

Parameters

Name Type Description
bid double? Bid price if changed otherwise null.
ask double? Ask price if changed otherwise null.

Return Value

void

AddBars

Summary

Adds bars for a time frame that will be used for this custom symbol.

Remarks

If bars already exist for the time frame existing bars will be returned.

Signature

1
public abstract CustomBars AddBars(TimeFrame timeFrame)

Parameters

Name Type Description
timeFrame TimeFrame Bars TimeFrame, it must be a built-in time frame not custom.

Return Value

CustomBars

GetBars

Summary

Returns bars of a time frame if exists otherwise null.

Signature

1
public abstract CustomBars GetBars(TimeFrame timeFrame)

Parameters

Name Type Description
timeFrame TimeFrame Bars TimeFrame, it must be a built-in time frame not custom.

Return Value

CustomBars

RemoveBars

Summary

Removes bars of a time frame which has no user.

Remarks

Returns false if bars were being used or there was no added bars for passed time frame.

Signature

1
public abstract bool RemoveBars(TimeFrame timeFrame)

Parameters

Name Type Description
timeFrame TimeFrame Bars TimeFrame, it must be a built-in time frame not custom.

Return Value

bool

RemoveAllUnloadedBars

Summary

Removes all existing unloaded custom bars that aren't being used.

Remarks

Use this method to free up memory.

Signature

1
public abstract void RemoveAllUnloadedBars()

Return Value

void

Properties

Name

Summary

Gets custom symbol unique name.

Signature

1
public abstract string Name {get;}

Return Value

string

Id

Summary

Gets the custom symbol ID.

Signature

1
public abstract long Id {get;}

Return Value

long

BaseAsset

Summary

Gets / sets the symbol base asset.

Signature

1
public abstract Asset BaseAsset {get; set;}

Return Value

Asset

QuoteAsset

Summary

Gets / sets the symbol quote asset.

Signature

1
public abstract Asset QuoteAsset {get; set;}

Return Value

Asset

Description

Summary

Gets / sets symbol description.

Signature

1
public abstract string Description {get; set;}

Return Value

string

LotSize

Summary

Gets / sets the lot size.

Signature

1
public abstract long LotSize {get; set;}

Return Value

long

TickDigits

Summary

Gets / sets the symbol tick digits.

Signature

1
public abstract int TickDigits {get; set;}

Return Value

int

PipDigits

Summary

Gets / sets the symbol pip digits.

Signature

1
public abstract int PipDigits {get; set;}

Return Value

int

VolumeInUnitsStep

Summary

Gets / sets the step volume in units.

Signature

1
public abstract double VolumeInUnitsStep {get; set;}

Return Value

double

VolumeInUnitsMax

Summary

Gets / sets the maximum units value.

Signature

1
public abstract double VolumeInUnitsMax {get; set;}

Return Value

double

VolumeInUnitsMin

Summary

Gets / sets the minimum units value.

Signature

1
public abstract double VolumeInUnitsMin {get; set;}

Return Value

double

DynamicLeverage

Summary

Gets / sets the symbol dynamic leverage.

Signature

1
public abstract ICollection<CustomSymbolLeverageTier> DynamicLeverage {get;}

Return Value

ICollection

MarketHours

Summary

Gets / sets the symbol market hours.

Signature

1
public abstract CustomSymbolMarketHours MarketHours {get;}

Return Value

CustomSymbolMarketHours

PnLConversionFeeRate

Summary

Gets / sets the symbol profit and loss conversion fee rate.

Signature

1
public abstract double PnLConversionFeeRate {get; set;}

Return Value

double

Commission

Summary

Gets / sets the amount of base commission for the symbol.

Signature

1
public abstract double Commission {get; set;}

Return Value

double

CommissionType

Summary

Gets / sets the symbol base commission calculation type.

Signature

1
public abstract SymbolCommissionType CommissionType {get; set;}

Return Value

SymbolCommissionType

MinCommission

Summary

Gets / sets the minimum amount of commission for the symbol.This is the amount of commission that will be paid by trader for any trade.Check MinCommissionType for interpretation of MinCommission value.

Signature

1
public abstract double MinCommission {get; set;}

Return Value

double

MinCommissionAsset

Summary

Gets / sets the symbol minimum commission asset.If MinCommissionType is set to Asset then you can use this property to get that asset.The MinCommission value will be converted from MinCommissionAsset to account deposit asset at the moment of trade.

Signature

1
public abstract Asset MinCommissionAsset {get; set;}

Return Value

Asset

MinCommissionType

Summary

Gets / sets the symbol minimum commission type.Use this property to interpret MinCommission value.

Signature

1
public abstract SymbolMinCommissionType MinCommissionType {get; set;}

Return Value

SymbolMinCommissionType

AdministrativeCharge3DaysRollover

Summary

Gets / sets the Day of the week (in UTC) when Administrative Fee charge amount will be tripled.Only applicable for SWAP free trading accounts.

Signature

1
public abstract DayOfWeek? AdministrativeCharge3DaysRollover {get; set;}

Return Value

DayOfWeek?

AdministrativeCharge

Summary

Gets symbol administrative charge.Administrative fee will be charged instead of SWAP if account is marked as SWAP free.Only applicable for SWAP free trading accounts.

Signature

1
public abstract double AdministrativeCharge {get; set;}

Return Value

double

GracePeriod

Summary

Gets / sets symbol grace period.This is the number of days free of Administrative fee from the time of opening a position.Only applicable for SWAP free trading accounts.

Signature

1
public abstract int GracePeriod {get; set;}

Return Value

int

SwapPeriod

Summary

Gets / sets symbol swap period.This is the number of days free of Administrative fee from the time of opening a position.

Signature

1
public abstract int SwapPeriod {get; set;}

Return Value

int

WeekendSwaps

Summary

Gets / sets whether swap is charged on weekends or not.

Signature

1
public abstract bool WeekendSwaps {get; set;}

Return Value

bool

SwapLong

Summary

Gets / sets the SWAP charge for long positions of the symbol.

Signature

1
public abstract double SwapLong {get; set;}

Return Value

double

SwapShort

Summary

Gets / sets the SWAP charge for short positions of the symbol.

Signature

1
public abstract double SwapShort {get; set;}

Return Value

double

SwapTimeInMinutes

Summary

Gets / sets the SWAP time in minutes.

Signature

1
public abstract int SwapTimeInMinutes {get; set;}

Return Value

int

Swap3DaysRollover

Summary

Gets / sets the Day of the week when Symbol SWAP charge amount will be tripled.

Signature

1
public abstract DayOfWeek? Swap3DaysRollover {get; set;}

Return Value

DayOfWeek?

SwapCalculationType

Summary

Gets / sets the symbol SWAP calculation type.

Signature

1
public abstract SymbolSwapCalculationType SwapCalculationType {get; set;}

Return Value

SymbolSwapCalculationType

MinDistanceType

Summary

Gets / sets the symbol minimum distances type.

Signature

1
public abstract SymbolMinDistanceType MinDistanceType {get; set;}

Return Value

SymbolMinDistanceType

MinTakeProfitDistance

Summary

Gets / sets symbol minimum take profit distance.Use MinDistanceType for interpretation.

Signature

1
public abstract double MinTakeProfitDistance {get; set;}

Return Value

double

MinStopLossDistance

Summary

Gets / sets symbol minimum stop loss distance.Use MinDistanceType for interpretation.

Signature

1
public abstract double MinStopLossDistance {get; set;}

Return Value

double

FuturesSettings

Summary

Gets / sets custom future contract settings.

Signature

1
public abstract CustomSymbolFuturesSettings FuturesSettings {get; set;}

Return Value

CustomSymbolFuturesSettings

Sentiment

Summary

Gets custom symbol sentiment.

Signature

1
public abstract CustomSymbolSentiment Sentiment {get;}

Return Value

CustomSymbolSentiment

Ask

Summary

Gets the current ask price for this symbol.

Signature

1
public abstract double Ask {get;}

Return Value

double

Bid

Summary

Gets the current bid price for this symbol.

Signature

1
public abstract double Bid {get;}

Return Value

double

Symbol

Summary

Gets regular Symbol.

Signature

1
public abstract Symbol Symbol {get;}

Return Value

Symbol

BarsNeeded

Summary

Gets / sets BarsNeeded handler, it's triggered when bars are needed for a time frame of current custom symbol.

Remarks

BarsNeeded is not triggered if there is already an added Bars for requested time frame.

Signature

1
public abstract Action<CustomSymbolBarsNeededArgs> BarsNeeded {get; set;}

Return Value

Action

Events

NewChart

Summary

Occurs when user opens a new chart of current custom symbol.

Signature

1
public abstract event Action<CustomSymbolNewChartEventArgs> NewChart;

BarsUnloaded

Summary

Occurs when a custom bars is unloaded and not being used anymore.

Remarks

Use this event to remove the unloaded custom bars to free up memory.

Signature

1
public abstract event Action<CustomSymbolBarsUnloadedEventArgs> BarsUnloaded;