Canadian Dollar Currency Index updates in real time and doesn't close like tradingview.com's currency indexes. Based off of the Bank of Canada's CEER methodology and tracks it quite closely, although not perfectly. It seems to be higher than the Bank of Canada's index by 2 points. This could be due to using different data for the currencies and as I am not proficient in PineScript, I don't think I was able to replicate the formula exactly...? Regardless ,it works well and is more than close enough to suit one's purpose of tracking the Canadian dollar against a basket of currencies that are weighted according to the Bank of Canada's total weights (The total weight of a country j in year t is a weighted average of the their import, export and third-market competition weights). For more information on the actual Bank of Canada's index: bankofcanada.ca/rates/exchange/canadian-effective-exchange-rates/