assetHistory(string Name, int Mode)

Loads price history of an asset from online data providers such as Quandl™, or from the broker's price server.

Parameters:

Name

Asset name used by the price source, or Quandl code, or 0 for the current asset.

Mode

FROM_GOOGLE - download daily (D1) price data from Google™ Finance.
FROM_QUANDL - download daily (D1) price data from Quandl™ (Zorro S required).
FROM_AV - download daily (D1) price data from AlphaVantage™ (Zorro S required).
FROM_YAHOO - download daily (D1) price data from Yahoo™ Finance (currently inoperational).
FROM_YAHOO|UNADJUSTED - use unadjusted prices.
1 - download one-minute (M1) price data from the selected broker or price source.
0 - download tick quote (T1) data from the selected broker or price source (Zorro S required).

Remarks:

Example:

// Update M1 price history of all assets
function run()
{
  NumYears = 2;
  while(loop(Assets))
    assetHistory(Loop1,1);
  quit();
}

// Download AAPL D1 prices from Quandl
function main()
{
  assetHistory("YAHOO/AAPL",FROM_QUANDL);
}

See also:

price, asset, UpdateDays, loadStatus, Import, dataDownload

► latest version online