OPEN-SOURCE SCRIPT
Zaktualizowano 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:
Informacje o Wersji
accuracy improves and better representationInformacje o Wersji
Accuracy and reliability enhanced Informacje o Wersji
Accuracy enhanced and error removes Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.