RAZNET

Composite Any Currency Strength Index

This is a flexible currency strength indicator and you can adjust it to any currency you wish 'to measure'. By default, it is set to measure USD major pairs. Indicator calculates every pair you list, and plots one composite chart in the form of Heikin Ashi candles. Basically, you will get USD index in this case. Similarly, you can get AUD, EUR, CAD, JPY, CHF, etc indexes by specifying corresponding symbols. Remember about base and quote currencies and location of each for correct calculations. Simple adjustments in the script needed if you want to value USD by using USD in both base and quote (counter) currencies.

For example, when calculating USD strength by looking into USDJPY (not into JPYUSD) symbols, you will need to add minus "-" before corresponding security in the script itself, not in the Settings Inputs.


Default study script (with JPYUSD):
// Inputs
...
string sec3 = input(defval="JPYUSD", type=input.symbol, title="Symbol")
...
h_sec3 = security(heikinashi(sec3), timeframe.period, high)
l_sec3 = security(heikinashi(sec3), timeframe.period, low)
o_sec3 = security(heikinashi(sec3), timeframe.period, open)
c_sec3 = security(heikinashi(sec3), timeframe.period, close)

Adjusted study script with USDJPY:
// Inputs
...
string sec3 = input(defval="USDJPY", type=input.symbol, title="Symbol")
...
h_sec3 = -security(heikinashi(sec3), timeframe.period, high)
l_sec3 = -security(heikinashi(sec3), timeframe.period, low)
o_sec3 = -security(heikinashi(sec3), timeframe.period, open)
c_sec3 = -security(heikinashi(sec3), timeframe.period, close)


Unfortunately, I am not a coder specialist and perhaps someone here could improve this indicator for easier and more friendly adjustments. But thanks to variety of symbols on TradingView, you can ignore any changes in the script, and just use symbols with corresponding counter currency offered by this great platform.

Bollinger Bands, 2 x RMA, 4 x SMA/EMA were added for deeper analysing of the index. Other indicators with ability to select data sources (like CCI, StochRSI, Momentum etc) can be separately added to a current chart, but use Composite Any Currency Strength Index data as the source for analysing displayed pair, i.e. by selecting source - Composite Any Currency Strength Index: SMA Close or EMA HLC.

Thank you and good luck everyone!
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?