Time zone of the current asset, used for setting AssetFrame to a daily TimeFrame that begins at FrameOffset in local time. When your strategy contains a portfolio of different assets that you want to trade
daily at different times, use this parameter to define the time frames of individual assets.
Time zone of the current asset, used for setting AssetFrame to a non-daily TimeFrame that skips all bars outside market hours in local time, but follows the BarPeriod inside market hours. The market hours are given by StartMarket and EndMarket. AssetMarket is mutually exclusive to AssetZone,
and is used for intraday trading.
int, -23..+24, or UTC, WET, CET, ET, JST, AEST
0 when the current bar has no price quotes of the current asset or is to be skipped according to AssetZone or AssetMarket; negative number of skipped bars at the end of the time frame; 1 otherwise. Can be used to set TimeFrame for skipping bars
that have no quotes or lie outside market hours, or for trading on different time zones (see example).
Bar number of the last received price quote of the current asset,
from 1 (first bar) up to Bar
(current bar). Can be used to determine if there was a quote in the current bar.
- Asset variables can be set and evaluated individually for every asset.
The asset must be selected before setting or evaluating the variables.
- For emulating day bars of different assets with different time zones, use 1-hour bars with AssetZone and AssetFrame (see example). Use FrameOffset for starting the emulated bar at a certain local hour.
- For skipping bars outside market hours, set AssetMarket
to the time zone and set TimeFrame =
AssetFrame. For only preventing trades outside market hours without
skipping bars, set the BR_LEISURE flag or check the trade time by script.
// trade two assets with different time zones
BarPeriod = 60;
FrameOffset = 9; // trade both assets at 9:00 of their local time
AssetZone = WET;
AssetZone = JST;
TimeFrame = AssetFrame; // use a daily time frame changing at 9:00 local time
TimeFrame, StartMarket, LookBack, asset
► latest version online