OPEN-SOURCE SCRIPT

Previous High and Low Count with Probabilities + Risk On/Off

1. Purpose of the Script:
This trading script combines two important concepts:

Previous High and Low Count: It tracks whether the current price exceeds the previous day’s high or low and calculates probabilities for the next price movement (up or down).
Risk On / Risk Off Indicator: It evaluates market sentiment through various indicators (such as the Fear & Greed Index, VIX, and others) and shows whether the market is in a risk-on or risk-off state. This information impacts the probabilities of price movement.
2. How it Works:
Previous High and Low:

The script tracks how often the price exceeds the previous day’s high or low and calculates the probability of an upward or downward movement based on that. This gives you an idea of how often the market reacts at the previous day's high or low.
Risk On / Risk Off:

Based on various market factors (Fear & Greed Index, VIX, Put-Call Ratio, etc.), the script calculates the Risk On or Risk Off state.
In Risk On, the probability of an upward movement increases, and the probability of a downward movement decreases. In Risk Off, it’s the opposite.
Adjusted Probabilities:

The probabilities for an Up or Down movement are adjusted based on the current Risk On / Risk Off state. In a Risk On environment, the probability for an upward move increases, while in a Risk Off environment, the probability for a downward move increases.
3. How to Use the Script:
Add the Script in TradingView:

TradingView:
Click on "Add to Chart" to apply the script to your chart.
Manual Input of Indicators:

For the Fear & Greed Index, VIX, and other indicators, you need to manually enter the current values. You can get these values from various publicly available sources:
Fear & Greed Index: CNN Fear & Greed Index
VIX (Volatility Index): VIX Index
Other indicators like Put-Call Ratio, Bitcoin Volatility, Oil Prices, and US Dollar Index can also be manually inputted, and they can be found on finance websites like Yahoo Finance, MarketWatch, and Bloomberg.
Observe the Colors and Symbols:

If the market is in a Risk On state, the background will turn green, and a green triangle will appear below the candle.
If the market is in a Risk Off state, the background will turn red, and a red triangle will appear above the candle.
Track the Probabilities:

A label will appear on the chart showing the calculated probabilities for Up and Down movements. These probabilities are adjusted based on the current market state (Risk On/Off).
4. Meaning of the Probabilities:
Up Probability: Indicates the probability that the price will rise.
Down Probability: Indicates the probability that the price will fall.
The probabilities are dynamic and adjust based on the Risk On / Risk Off state, helping you make better decisions based on the current market conditions.
Candlestick analysisChart patternsCycles

สคริปต์โอเพนซอร์ซ

ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถเข้าใจและตรวจสอบได้ ต้องขอบคุณผู้เขียน! ที่ให้คุณใช้ได้ฟรี แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?

คำจำกัดสิทธิ์ความรับผิดชอบ