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.
Syntax
public sealed enum RunningMode
Members
Name | Type | Summary |
---|---|---|
Optimization | Field | The cBot is running in the optimization mode. |
RealTime | Field | The cBot is running in real time. |
SilentBacktesting | Field | The cBot is running in the silent backtesting mode. |
VisualBacktesting | Field | The cBot is running in the visual backtesting mode. |
Example 1
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; } } } }