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, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.

Хотите использовать этот скрипт на графике?