CustomTimeFrame
Summary
Represents a custom time frame.
Signature
1 | |
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 | |
Parameters
| Name | Type | Description |
|---|---|---|
| symbol | Symbol | Bars Symbol |
Return Value
CustomBars
GetBars
Summary
Returns bars of a symbol if exists otherwise null.
Signature
1 | |
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 | |
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 | |
Return Value
void
Properties
Name
Summary
Gets Custom time frame unique name.
Signature
1 | |
Return Value
string
Description
Summary
Gets / sets custom time frame description.
Signature
1 | |
Return Value
string
TimeFrame
Summary
Gets regular time frame.
Signature
1 | |
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 | |
Return Value
Action
Events
NewChart
Summary
Occurs when user opens a new chart of current custom time frame.
Signature
1 | |
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 | |