CustomBars
Summary
Represents a mutable collection of OHLC bars that will be used for a custom time frame / symbol.
Signature
1 | |
Namespace
cAlgo.API
See Also
Methods
AppendBar
Summary
Appends a new bar to the end of bars collection.
Remarks
Append will fail with an exception if new bar time is not after last bar time.
Signature
1 | |
Parameters
| Name | Type | Description |
|---|---|---|
| bar | CustomBar | New bar |
Return Value
void
AppendBars
Summary
Appends a collection of bars to the end of bars collection.
Remarks
Append will fail with an exception if first new bar time is not after last bar time.
Signature
1 | |
Parameters
| Name | Type | Description |
|---|---|---|
| bars | IEnumerable | New bars |
Return Value
void
PrependBar
Summary
Prepends a new bar to the start of bars collection.
Remarks
Prepend will fail with an exception if new bar time is not before first bar time.
Signature
1 | |
Parameters
| Name | Type | Description |
|---|---|---|
| bar | CustomBar | New bar |
Return Value
void
PrependBars
Summary
Prepends a collection of bars to the start of bars collection.
Remarks
Prepend will fail with an exception if last new bar time is not before first bar time.
Signature
1 | |
Parameters
| Name | Type | Description |
|---|---|---|
| bars | IEnumerable | New bars |
Return Value
void
UpdateLastBar
Summary
Updates the last bar.
Remarks
Update will fail with an exception if collection is empty.
Signature
1 | |
Parameters
| Name | Type | Description |
|---|---|---|
| open | double | Open price |
| high | double | High price |
| low | double | Low price |
| close | double | Close price |
| volume | long | Volume amount |
Return Value
void
Properties
Symbol
Summary
Gets symbol of custom bars.
Signature
1 | |
Return Value
Symbol
TimeFrame
Summary
Gets timeframe of custom bars.
Signature
1 | |
Return Value
TimeFrame
Bars
Summary
Gets readonly bars.
Signature
1 | |
Return Value
Bars
Related Tutorials
IsLoaded
Summary
Gets IsLoaded status, If true it means custom bars is being used and can't be removed.
Signature
1 | |
Return Value
bool
Events
NeedsMore
Summary
Occurs when user scrolls back on a custom bars chart.
Remarks
Use this event to prepend more bars.
Signature
1 | |