AssetZone

Time zone of the selected asset, used for calculating AssetFrame. When your strategy contains a portfolio of different assets that you want to trade at different times, use this parameter to define the time frames of individual assets.

Type:

int, -23..+24, or UTC, WET, CET, ET, JST, AEST

AssetFrame

0 when the current bar has no price quotes of the current asset or lies inside a day in the AssetZone, negative number of skipped bars at quote arrival or at day change, 1 otherwise. Can be used to set TimeFrame for skipping bars with no quotes or for daily trading on different time zones (see example).

AssetBar

Bar number of the last received price quote of the current asset, from 0 to NumBars-1. Can be used to determine if there was a quote in the current bar.

Type:

int, read/only

Remarks:

Example:

// trade two assets with different time zones
BarPeriod = 60;
FrameOffset = 9; // trade both assets at 9:00 of their local time
while(asset(loop("EUR/USD","USD/JPY")))
{
  if(strstr(Asset,"EUR"))
    AssetZone = WET;
  else if(strstr(Asset,"JPY"))
    AssetZone = JST;
	TimeFrame = AssetFrame;
  ...
}

See also:

Bars, TimeFrame, BarOffset, LookBack, run, asset

 

► latest version online