Algo¶
Summary¶
The container class for the main cAlgo.API Interfaces.
Signature
1 |
|
Namespace¶
cAlgo.API.Internals
Methods¶
BeginInvokeOnMainThread¶
Summary
Invokes asynchronously the specified code on the main cBot or Indicator thread.
Signature
1 |
|
Parameters
Name | Type | Description |
---|---|---|
action | Action | The code to invoke on the main cBot/Indicator thread |
Return Value
void
RefreshData¶
Summary
Updates MarketSeries, Positions, PendingOrders, History, etc.And sends postponed events after Thread sleep call.If you put the main thread on sleep by calling Thread sleep methodthen you have to call RefreshData after Thread wakes up to sendthe postponed events while thread was sleeping.
Signature
1 |
|
Return Value
void
Examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
CreateDataSeries¶
Summary
Initialization of an IndicatorDataSeries.
Signature
1 |
|
Return Value
IndicatorDataSeries
Examples
1 2 3 4 5 6 7 8 9 |
|
Sleep (3)¶
Sleep (1 of 3)
Summary
Suspends the algorithm until the specified timespan elapses.
Signature
1 |
|
Parameters
Name | Type | Description |
---|---|---|
timespan | TimeSpan | The Timespan during which the algorithm should not react to any events. |
Return Value
void
Related Tutorials
Sleep (2 of 3)
Summary
Suspends the algorithm until the specified number of milliseconds elapses.
Signature
1 |
|
Parameters
Name | Type | Description |
---|---|---|
milliseconds | int | The number of milliseconds for which the algorithm should be suspended. |
Return Value
void
Related Tutorials
Sleep (3 of 3)
Summary
Suspends the algorithm until the specified datetime.
Signature
1 |
|
Parameters
Name | Type | Description |
---|---|---|
dateTime | DateTime | The DateTime until the algorithm should be suspended. |
Return Value
void
Related Tutorials
Print (3)¶
Print (1 of 3)
Summary
Prints text representation of the specified object to the log.
Signature
1 |
|
Parameters
Name | Type | Description |
---|---|---|
value | object | Object to print. |
Return Value
void
Examples
1 |
|
Print (2 of 3)
Summary
Prints a message to the Log
Signature
1 |
|
Parameters
Name | Type | Description |
---|---|---|
parameters | object[] | Parameters to print |
Return Value
void
Examples
1 |
|
Print (3 of 3)
Summary
Prints a message to the Log.
Signature
1 |
|
Parameters
Name | Type | Description |
---|---|---|
message | string | Message to print. |
parameters | object[] | Parameters (optional) |
Return Value
void
Examples
1 |
|
Properties¶
InstanceId¶
Summary
Returns unique ID of current running instance.
Signature
1 |
|
Return Value
string
LocalStorage¶
Summary
Access the local storage API.
Signature
1 |
|
Return Value
LocalStorage
Related Tutorials
Indicators¶
Summary
Access to the built-in Indicators.
Signature
1 |
|
Return Value
IIndicatorsAccessor
Examples
1 2 3 4 5 |
|
Related Tutorials
Notifications¶
Summary
Represents the notifications, such as sounds and email.
Signature
1 |
|
Return Value
INotifications
Examples
1 |
|
1 2 |
|
TimeFrame¶
Summary
Access to the TimeFrame values.
Signature
1 |
|
Return Value
TimeFrame
Examples
1 2 3 4 |
|
Server¶
Summary
Server related information.
Signature
1 |
|
Return Value
IServer
Examples
1 2 3 4 |
|
TimeZone¶
Summary
TimeZone of a cBot or an Indicator.
Signature
1 |
|
Return Value
TimeZoneInfo
Positions¶
Summary
The list of all open positions of the account.
Signature
1 |
|
Return Value
Positions
Examples
1 2 3 4 5 |
|
PendingOrders¶
Summary
The array of all Pending Orders of the account.
Signature
1 |
|
Return Value
PendingOrders
Examples
1 2 3 4 5 6 |
|
History¶
Summary
Represents the collection of all historical trades of the account.
Signature
1 |
|
Return Value
History
Examples
1 2 3 4 |
|
Timer¶
Summary
Access to the Timer object.
Signature
1 |
|
Return Value
Timer
Examples
1 2 3 4 5 6 7 8 |
|
Time¶
Summary
Returns the current server time. The shortcut to the Server.Time property.
Signature
1 |
|
Return Value
DateTime
Examples
1 2 3 4 |
|
TimeInUtc¶
Summary
Returns the current server time in UTC. The shortcut to the Server.TimeInUtc property.
Signature
1 |
|
Return Value
DateTime
Examples
1 2 3 4 |
|
RunningMode¶
Summary
Defines if a cBot is running in real time, in the silent backtesting mode, in the visual backtesting mode, or inthe optimization mode.
Signature
1 |
|
Return Value
RunningMode
IsBacktesting¶
Summary
True if a cBot is in the Backtesting mode, otherwise False.
Signature
1 |
|
Return Value
bool
Examples
1 2 3 4 |
|
Application¶
Summary
Represents the application.
Signature
1 |
|
Return Value
Application
AssetConverter¶
Summary
Converts an asset to another asset.
Signature
1 |
|
Return Value
IAssetConverter
Related Tutorials
MarketSessions¶
Summary
Returns current market sessions.
Signature
1 |
|
Return Value
MarketSession
Related Tutorials
Chart¶
Summary
Represents the chart where cBot or Indicator is launched.
Remarks
Chart can be null for indicators that were run by a plugin.
Signature
1 |
|
Return Value
Chart
Assets¶
Summary
Returns list of all available assets.
Signature
1 |
|
Return Value
Assets
SymbolName¶
Summary
Gets or sets the symbol name.
Signature
1 |
|
Return Value
string
Symbols¶
Summary
Gets the symbol names.
Signature
1 |
|
Return Value
Symbols
Symbol¶
Summary
Represents the current symbol provides access to its properties and certain methods
Signature
1 |
|
Return Value
Symbol
Examples
1 2 3 4 5 6 |
|
1 |
|
1 |
|
Bid¶
Summary
Gets the symbol bid price.
Signature
1 |
|
Return Value
double
Ask¶
Summary
Gets the symbol ask price.
Signature
1 |
|
Return Value
double
Watchlists¶
Summary
Gets the watchlist.
Signature
1 |
|
Return Value
Watchlists
Bars¶
Summary
The collection of Bar objects.
Signature
1 |
|
Return Value
Bars
Related Tutorials
MarketData¶
Summary
Provides access to the Depth of Market Data.
Signature
1 |
|
Return Value
MarketData
Examples
1 2 |
|
Http¶
Summary
Send HTTP requests.
Signature
1 |
|
Return Value
Http
Related Tutorials
ChartIndicators¶
Summary
Gets the ChartIndicators of an algorithm.
Signature
1 |
|
Return Value
ChartIndicators
Related Tutorials
ChartRobots¶
Summary
Gets the ChartRobots of an algorithm.
Signature
1 |
|
Return Value
ChartRobots
AlgoRegistry¶
Summary
Provides access to installed Algorithms.
Signature
1 |
|
Return Value
AlgoRegistry
Related Tutorials
HistoricalOrders¶
Summary
Provides access to historical orders.
Signature
1 |
|
Return Value
HistoricalOrders
Compiler¶
Summary
Provides access to algo compiler.
Signature
1 |
|
Return Value
Compiler
InstanceTitle¶
Summary
Gets or sets instance title.
Remarks
Set value is only used while instance is running.
Signature
1 |
|
Return Value
string
Events¶
MarketSessionsChanged¶
Summary
Occurs when market sessions change.
Signature
1 |
|