ActualTradingDayEndLocal

View as Markdown

Definition

Returns the session’s End-Of-Day (EOD) in the user’s configured timezone.

In order to obtain historical ActualTradingDayEndLocal information, you must call GetNextSession from a stored SessionIterator object.

Property Value

A DateTime structure that represents end of a trading day (EOD).

Syntax

SessionIterator.ActualTradingDayEndLocal

Example

1SessionIterator sessionIterator;
2
3protected override void OnStateChange()
4{
5 if (State == State.Historical)
6 {
7 sessionIterator = new SessionIterator(Bars);
8 }
9}
10
11protected override void OnBarUpdate()
12{
13 // on new bars session, find the next trading session
14 if (Bars.IsFirstBarOfSession)
15 {
16 // use the current bar time to calculate the next session
17 sessionIterator.GetNextSession(Time[0], true);
18
19 Print("The current session end of day is " + sessionIterator.ActualTradingDayEndLocal);
20 }
21}