static public method core.isnontrading

Brief

Checks whether the specified date and time is the regular non-trading hours.

Declaration
Lua
core.isnontrading (datetime, tradingDayOffset)

Parameters
datetime

The date and time (as a number). That number means the number of days past midnight December 30, 1899 (also known as the OLE date/time format).

tradingDayOffset

The offset between the day's midnight and the date and of the begin of the trading day. For example, FXCM's trading day starts at 17:00 of yesterday, so the offset if -7 hours.

Returns

The function returns two values:

The first value is a boolean value. In case the value is true, the specified date belongs to the regular non-trading hours (for example, Friday 17:00 - Sunday 17:00 for -7 (FXCM strandard tradingDayOffset).

The second value is the date and time when the non-trading period begins or nil in case the date and time does not belong to the non-trading period.

Details

The function works always with FXCM's trading week rules, i.e. when non-trading period are Satuday and Sunday trading days (17:00EST Friday-17:00EST Sunday for NY servers).

back