The amount of information available on Quandl is staggering. A new quandl() function in Pine makes it even easier for Pine coders to design indicators and strategies using alternative datasets like avocado prices, Fed Balance sheet data, Blockchain data, and much more unique data from around the globe.
We first integrated Quandl data to TradingView in 2014. You can use Quandl data directly on our charts, or from Pine scripts. While it’s possible to use the Pine security function to access the data, the new quandl() function makes it simpler.
The function uses the following syntax:
quandl(ticker, gaps, index)
ticker — a string containing the name of the Quandl code, such as “FRED/WALCL.”
gaps — an optional parameter, similar to its namesake in the security function.
The default barmerge.gaps_off value makes the data continuous on all bars, filling bar values with the nearest, previously obtained value. Note that barmerge.gaps_on only shows new values once and uses na values for the other bars, so “gaps” will appear in the series.
index — the Quandl data series number. Many Quandl codes can return more than one series. The index allows you to specify which one. Learn how to find specific ticker and index values on Quandl through our Help Center.
Now let’s dive into an example of this function. Say you wanted data for the Effective Federal Funds Rate from Federal Reserve Economic Data. Your script would then look something like this: (note the complete Quandl ticker (QUANDL:FRED/DFF) in the script’s title, which can also be entered directly on a chart):
//@version=4 study("Effective Federal Funds Rate (QUANDL:FRED/DFF)") dff = quandl("FRED/DFF", barmerge.gaps_off, 0) plot(dff)
We’re excited to see what everyone creates with this data. Remember, you can find all top scripts here and if you are interested in learning more about Pine, begin your journey with the Pine User Manual’s Quickstart Guide. Thanks for reading and please keep sending us your feedback and comments. We love building for you.