: The timeframe of the requested data (e.g., "D" for daily, "60" for 60 minutes, "240" for 4-hour). An empty string "" refers to the current chart's timeframe.
You can fetch data from – even FX, crypto, or stocks – and combine them:
// Plot the close price on the current chart plot(aaplClose)
// Fetch the close price of AAPL on the 1-hour timeframe aaplClose = request.security("AAPL", "1H", close)
[dailyOpen, dailyClose] = request.security(syminfo.tickerid, "D", [open, close]) Use code with caution. Copied to clipboard