ここから---- //version=5 indicator("CFTC: JPY speculative net positions", precision=0, timeframe = "1W") import TradingView/LibraryCOT/2 as cot var cftcCode = cot.currencyToCFTCCode("JPY")
maLen = input.int(40, minval=1, title='Weekly SMA Length')
// Function to request COT data. dataRequest(metricName, direction) => tickerId = cot.COTTickerid('Legacy', cftcCode, false, metricName, direction, "All") value = request.security(tickerId, "1D", close, ignore_invalid_symbol = true) if barstate.islastconfirmedhistory and na(value) runtime.error("Could not find relevant COT data based on the current symbol.") value
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.