Support

Equilla Formula Language

IsLastTradingDay

Checks if the given date and time value is the last 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 last 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 last trading day
Input: Interval( Weekly, Monthly, Yearly ) = Weekly; If Interval = Weekly Then Begin If IsLastTradingDay( DateTime, TradingWeek ) Then DrawSymbol( Close, "Last Trading Day", SymbolVerticalLine ); End Else If Interval = Monthly Then Begin If IsLastTradingDay( DateTime, TradingMonth ) Then DrawSymbol( Close, "Last Trading Day", SymbolVerticalLine ); End Else If Interval = Yearly Then Begin If IsLastTradingDay( DateTime, TradingYear ) Then DrawSymbol( Close, "Last Trading Day", SymbolVerticalLine ); End;