Support

Equilla Formula Language

IsFirstTradingDay

Checks if the given date and time value is the first trading day for the specified interval.

Inputs

Datetime
Numeric: The date and time value to check.
Interval
Numeric: The interval to check the date and time value for.

Remarks

The function is determining the first trading day by taking trading sessions and holidays into account.

Intervals

TradingYear Specifies a trading interval of one year.
TradingMonth Specifies a trading interval of one month.
TradingWeek Specifies a trading interval of one week.

Examples

Mark the first trading day
Input: Interval( Weekly, Monthly, Yearly ) = Weekly; If Interval = Weekly Then Begin If IsFirstTradingDay( DateTime, TradingWeek ) Then DrawSymbol( Close, "First Trading Day", SymbolVerticalLine ); End Else If Interval = Monthly Then Begin If IsFirstTradingDay( DateTime, TradingMonth ) Then DrawSymbol( Close, "First Trading Day", SymbolVerticalLine ); End Else If Interval = Yearly Then Begin If IsFirstTradingDay( DateTime, TradingYear ) Then DrawSymbol( Close, "First Trading Day", SymbolVerticalLine ); End;