OPEN-SOURCE SCRIPT
업데이트됨 Vishall-Directional Probability

Vishall-Directionl Probability
All * dont have future contracts , based on there stock future contact , in case change in index stock , need to change the Stock here also
-----------------------------------------------------------------------------
If Future HA close is higher than Future normal close, it means the HA chart is still showing strength. It does not directly mean the next day will open lower.
Easy meaning
HA close > normal close = trend is still strong / bullish on that candle.
HA close < normal close = trend is weaker / bearish on that candle.
About next day open
You cannot confirm next day opening lower or higher from this one condition alone. Heikin Ashi is mainly for trend reading, not exact next-day prediction.
Simple rule
If HA candle is green, strong, and no lower wick → upside continuation is more likely.
If HA candle is small, weak, or has long upper wick → trend may slow or reverse.
So in short:
Future HA close > Future normal close = bullish strength, not a guaranteed lower open next day.
-------------------------------------------------------------------------------------------
you can frame this as a probability edge, not a prediction rule. Heikin Ashi is built to smooth noise and help traders see trend direction more clearly, so the useful question is whether the relationship between a, b, c, d improves the chance that the next candle is bullish or bearish.
Your variables
a = future HA close
b = future normal close
c = cash HA close
d = cash normal close
A practical way to read them is by measuring how much each HA close differs from its normal close, then comparing futures and cash. Heikin Ashi closes are averaged values, so the gap between HA close and normal close is a way to read how much smoothing is happening in that market.
Simple correlation idea
Use these two spreads:
F = a - b
C = c - d
Then create:
A = F - C = (a - b) - (c - d)
Interpretation:
A > 0: futures are showing relatively stronger HA support than cash.
A < 0: cash is showing relatively stronger HA support than futures.
A near 0: both are similar, so the signal is weaker.
This is not a guaranteed forecast, but it is a clean way to compare relative trend strength between futures and cash using Heikin Ashi smoothing.
Better probability setup
For better chance of usefulness, do not rely on one formula alone. Add simple conditions:
Bullish bias if a > b, c > d, and A > 0.
Bearish bias if a < b, c < d, and A < 0.
Neutral if the values conflict or A is small.
Heikin Ashi works best for trend continuation and reversal awareness, not exact price targets, so this type of rule is more useful for “which side has better probability” than “where price will exactly go”.
Practical formula options
If you want a stronger single-number score, try:
Score 1 = (a - b) + (c - d), to measure total HA strength.
Score 2 = (a - b) - (c - d), to measure futures vs cash imbalance.
Score 3 = (a / b) - (c / d), if you prefer ratio-based comparison.
Among these, Score 2 is usually the most useful for your purpose because it directly compares futures strength against cash strength. Ratios can help, but subtraction is easier to read and more stable for trading interpretation.
How to use it
For next-day and rest-of-day strength:
Use the formula on multiple past days.
Check whether positive A more often led to green next candles.
Check whether negative A more often led to red next candles.
Keep separate records for intraday and overnight behavior.
---------------------------------------------------------------------------------------
the right way is to normalize A as a percentage, so a ₹10 stock and a Nifty contract can be compared on the same scale. Heikin Ashi itself is meant to smooth price and highlight trend strength, so using raw points alone is not enough when prices are at very different levels.
Normalize the signal
Use this first:
𝐹
=
𝑎
−
𝑏
𝑏
×
100
F=
b
a−b
×100
𝐶
=
𝑐
−
𝑑
𝑑
×
100
C=
d
c−d
×100
𝐴
=
𝐹
−
𝐶
A=F−C
This makes A a relative strength percentage, not a raw rupee difference. That is the cleanest way to compare a low-priced stock with an index or a high-priced stock because the signal becomes size-independent.
What it means
Positive A means futures HA strength is greater than cash HA strength on a percentage basis.
Negative A means cash HA strength is greater than futures HA strength.
Near zero A means both are showing similar relative strength.
This is better than using absolute rupee movement because a ₹1 move is huge for a ₹10 stock but tiny for a ₹20,000 index. Normalizing by price turns the move into a comparable ratio, which is closer to a true strength measure.
Better strength score
If you want one single number, use:
All * dont have future contracts , based on there stock future contact , in case change in index stock , need to change the Stock here also
-----------------------------------------------------------------------------
If Future HA close is higher than Future normal close, it means the HA chart is still showing strength. It does not directly mean the next day will open lower.
Easy meaning
HA close > normal close = trend is still strong / bullish on that candle.
HA close < normal close = trend is weaker / bearish on that candle.
About next day open
You cannot confirm next day opening lower or higher from this one condition alone. Heikin Ashi is mainly for trend reading, not exact next-day prediction.
Simple rule
If HA candle is green, strong, and no lower wick → upside continuation is more likely.
If HA candle is small, weak, or has long upper wick → trend may slow or reverse.
So in short:
Future HA close > Future normal close = bullish strength, not a guaranteed lower open next day.
-------------------------------------------------------------------------------------------
you can frame this as a probability edge, not a prediction rule. Heikin Ashi is built to smooth noise and help traders see trend direction more clearly, so the useful question is whether the relationship between a, b, c, d improves the chance that the next candle is bullish or bearish.
Your variables
a = future HA close
b = future normal close
c = cash HA close
d = cash normal close
A practical way to read them is by measuring how much each HA close differs from its normal close, then comparing futures and cash. Heikin Ashi closes are averaged values, so the gap between HA close and normal close is a way to read how much smoothing is happening in that market.
Simple correlation idea
Use these two spreads:
F = a - b
C = c - d
Then create:
A = F - C = (a - b) - (c - d)
Interpretation:
A > 0: futures are showing relatively stronger HA support than cash.
A < 0: cash is showing relatively stronger HA support than futures.
A near 0: both are similar, so the signal is weaker.
This is not a guaranteed forecast, but it is a clean way to compare relative trend strength between futures and cash using Heikin Ashi smoothing.
Better probability setup
For better chance of usefulness, do not rely on one formula alone. Add simple conditions:
Bullish bias if a > b, c > d, and A > 0.
Bearish bias if a < b, c < d, and A < 0.
Neutral if the values conflict or A is small.
Heikin Ashi works best for trend continuation and reversal awareness, not exact price targets, so this type of rule is more useful for “which side has better probability” than “where price will exactly go”.
Practical formula options
If you want a stronger single-number score, try:
Score 1 = (a - b) + (c - d), to measure total HA strength.
Score 2 = (a - b) - (c - d), to measure futures vs cash imbalance.
Score 3 = (a / b) - (c / d), if you prefer ratio-based comparison.
Among these, Score 2 is usually the most useful for your purpose because it directly compares futures strength against cash strength. Ratios can help, but subtraction is easier to read and more stable for trading interpretation.
How to use it
For next-day and rest-of-day strength:
Use the formula on multiple past days.
Check whether positive A more often led to green next candles.
Check whether negative A more often led to red next candles.
Keep separate records for intraday and overnight behavior.
---------------------------------------------------------------------------------------
the right way is to normalize A as a percentage, so a ₹10 stock and a Nifty contract can be compared on the same scale. Heikin Ashi itself is meant to smooth price and highlight trend strength, so using raw points alone is not enough when prices are at very different levels.
Normalize the signal
Use this first:
𝐹
=
𝑎
−
𝑏
𝑏
×
100
F=
b
a−b
×100
𝐶
=
𝑐
−
𝑑
𝑑
×
100
C=
d
c−d
×100
𝐴
=
𝐹
−
𝐶
A=F−C
This makes A a relative strength percentage, not a raw rupee difference. That is the cleanest way to compare a low-priced stock with an index or a high-priced stock because the signal becomes size-independent.
What it means
Positive A means futures HA strength is greater than cash HA strength on a percentage basis.
Negative A means cash HA strength is greater than futures HA strength.
Near zero A means both are showing similar relative strength.
This is better than using absolute rupee movement because a ₹1 move is huge for a ₹10 stock but tiny for a ₹20,000 index. Normalizing by price turns the move into a comparable ratio, which is closer to a true strength measure.
Better strength score
If you want one single number, use:
릴리즈 노트
accuracy improves and better representation릴리즈 노트
Accuracy and reliability enhanced 릴리즈 노트
Accuracy enhanced and error removes 오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.