RunningMode
Summary
Defines if a cBot is running in real time, in the silent backtesting mode, in the visual backtesting mode, or in the optimization mode.
Signature
Namespace
cAlgo.API
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 | using cAlgo.API;
namespace cAlgo.Robots
{
// This sample shows how to use the RunningMode property of your robot
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class RunningModeSample : Robot
{
protected override void OnStart()
{
switch (RunningMode)
{
case RunningMode.RealTime:
// If the robot is running on real time market condition
break;
case RunningMode.SilentBacktesting:
// If the robot is running on backtest and the visual mode is off
break;
case RunningMode.VisualBacktesting:
// If the robot is running on backtest and the visual mode is on
break;
case RunningMode.Optimization:
// If the robot is running on optimizer
break;
}
}
}
}
|
Fields
RealTime
Summary
The cBot is running in real time.
Signature
| public static RunningMode RealTime;
|
Return Value
RunningMode
SilentBacktesting
Summary
The cBot is running in the silent backtesting mode.
Signature
| public static RunningMode SilentBacktesting;
|
Return Value
RunningMode
VisualBacktesting
Summary
The cBot is running in the visual backtesting mode.
Signature
| public static RunningMode VisualBacktesting;
|
Return Value
RunningMode
Optimization
Summary
The cBot is running in the optimization mode.
Signature
| public static RunningMode Optimization;
|
Return Value
RunningMode