Skip to content

MarketSession

Summary

Represents the predefined market sessions.

Signature

1
public enum MarketSession

Namespace

cAlgo.API

Fields

Name Description
None None
Wellington Wellington
Tokyo Tokyo
Sydney Sydney
Singapore Singapore
Frankfurt Frankfurt
London London
NewYork NewYork

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
 using cAlgo.API;
 namespace cAlgo.Robots
 {
     [Robot(AccessRights = AccessRights.FullAccess)]
     public class MarketSessionsTest : Robot
     {
         [Parameter("Working Session", DefaultValue = MarketSession.London)]
         public MarketSession WorkingSession {get; set;}
         protected override void OnStart()
         {                       
             Print("Current Sessions: {0}", MarketSessions);
         }
         protected override void OnTick()
         {
             if (!MarketSessions.HasFlag(WorkingSession))
                 return;
             // Do something on WorkingSession only
             Print("It's working session");
         }
     }
 }

Last update: January 30, 2023