OPEN-SOURCE SCRIPT

Macro Risk On/Off Sentiment

업데이트됨
Overview
As an Ichimoku trader, I've always found it crucial to understand the broader market sentiment before entering trades. That's why I developed this Macro Risk On/Off Sentiment Indicator. It's designed to provide a comprehensive view of global market risk sentiment by analysing multiple factors across different asset classes. By combining nine key market indicators, it produces an overall risk sentiment score, giving me a clearer picture of the market's mood before I apply my Ichimoku strategy.

Rationale
While Ichimoku is powerful for identifying trends and potential entry points, I realised it doesn't always capture the broader market context. Markets don't exist in isolation—they're influenced by a myriad of factors including volatility, economic indicators, and cross-asset relationships. By creating this indicator, I aimed to fill that gap, providing myself with a macro view that complements my Ichimoku analysis.

How It Works
The indicator analyses nine different market factors:

  • VIX (Volatility Index): Measures market expectations of near-term volatility.
  • S&P 500 Performance: Represents the overall US stock market performance.
  • US 10-Year Treasury Yield: Indicates bond market sentiment and economic outlook.
  • Gold Price Movement: Often seen as a safe-haven asset.
  • US Dollar Index: Measures the strength of the USD against a basket of currencies.
  • Emerging Markets Performance: Represents risk appetite for higher-risk markets.
  • High Yield Bond Spreads: Indicates credit market risk sentiment.
  • Copper/Gold Ratio: An economic growth indicator.
  • Put/Call Ratio: Measures overall market sentiment based on options trading.


Each factor is assigned a score based on its z-score relative to its recent history, then weighted according to its perceived importance. The overall risk score is a weighted average of these individual scores.

How I Use It
Before applying my Ichimoku strategy, I first check this indicator to gauge the overall market sentiment:

  • I look at the blue line plotted on the chart, which represents the overall risk score.
  • I note the background colour: green for risk-on (positive score) and red for risk-off (negative score).
  • I check the label in the lower-left corner, which provides specific FX pair recommendations and market expectations.


In a risk-on environment (positive score):

  • I focus on long positions in AUD/JPY, NZD/JPY, EUR/USD, etc.
  • I look for short opportunities in USD/CAD, USD/NOK, etc.
  • I expect commodities and yields to rise


In a risk-off environment (negative score):

  • I focus on long positions in USD/JPY, USD/CHF, USD/CAD
  • I look for short opportunities in AUD/USD, NZD/USD, EUR/USD
  • I expect increased volatility and falling yields


The strength of the sentiment is reflected in how close the score is to either 1 (strong risk-on) or -1 (strong risk-off). This helps me gauge how aggressive or conservative I should be with my Ichimoku trades.

Customisation
I've designed this indicator to be flexible. You can modify it to:

  • Adjust the lookback period and moving average length (both default to 30)
  • Change the weighting of different factors in the final score calculation
  • Include or exclude specific factors based on your analysis needs


By combining this Macro Risk On/Off Sentiment Indicator with my Ichimoku analysis, I've found I can make more informed trading decisions, taking into account both the technical setups I see on the chart and the broader market context.
릴리즈 노트
New version removes the old educational labels which cluttered the script and replaces them with a real-time correlation score of the macro risk index vs the current symbol. A correlation of 1 means the symbol is moving in the same direction and proportion to the risk index, and a correlation of -1 means the opposite.

Interestingly, the correlation score validates the earlier instructions that the macro risk score is positively correlated to equities and negatively correlated to safe havens.
Breadth IndicatorsForexFundamental AnalysismacroriskriskoffriskonsentimentalanalysisStocksTrend Analysis

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?


또한 다음에서도:

면책사항