Skip to content

CustomTimeFrame

Summary

Represents a custom time frame.

Signature

1
public abstract interface CustomTimeFrame

Namespace

cAlgo.API

See Also

Methods

AddBars

Summary

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

Remarks

If bars already exist for the symbol existing bars will be returned.

Signature

1
public abstract CustomBars AddBars(Symbol symbol)

Parameters

Name Type Description
symbol Symbol Bars Symbol

Return Value

CustomBars

GetBars

Summary

Returns bars of a symbol if exists otherwise null.

Signature

1
public abstract CustomBars GetBars(Symbol symbol)

Parameters

Name Type Description
symbol Symbol Bars Symbol

Return Value

CustomBars

RemoveBars

Summary

Removes bars of a symbol which is not being used.

Remarks

Returns false if it was being used or there was no added bars for passed symbol.

Signature

1
public abstract bool RemoveBars(Symbol symbol)

Parameters

Name Type Description
symbol Symbol Bars Symbol

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 time frame unique name.

Signature

1
public abstract string Name {get;}

Return Value

string

Description

Summary

Gets / sets custom time frame description.

Signature

1
public abstract string Description {get; set;}

Return Value

string

TimeFrame

Summary

Gets regular time frame.

Signature

1
public abstract TimeFrame TimeFrame {get;}

Return Value

TimeFrame

BarsNeeded

Summary

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

Remarks

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

Signature

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

Return Value

Action

Events

NewChart

Summary

Occurs when user opens a new chart of current custom time frame.

Signature

1
public abstract event Action<CustomTimeFrameNewChartEventArgs> 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<CustomTimeFrameBarsUnloadedEventArgs> BarsUnloaded;