HDFC Bank: 14 Trades Full Workflow Analysis (Deep Dive)
Aa report ma har ek trade no DIP Search and PEAK Search logic deep ma samjava ma aavyu che.
Algorithm Summary
Aa aakhi workflow ma niche mujab na Dynamic Algorithms vapraya che:
- BUY Algorithm:
Optimal Entry Search -> Aa algo history ma jaine local DIP (sau thi ochho bhav) shozye che.
- SELL Algorithm:
Enhanced Strategy Exit: Aa main logic che jo indicators ne overrule kare che.
Local Peak Search (MAX): Aa mechanism 100 divas ma sau thi uncho bhav (Peak) shodhe che.
Compounding Profit Logic: Sell thaya pachi aakha capital ne compounding karva nu logic.
3. The "Why Wait?" Logic (Defining Absolute Minimum)
Tame joyu hase ke Trade #1 ma April 9 (₹710) skip thaine April 12 (₹683) par buy thayu. Aa logic badha trades mate same che:
- Good vs Best: Algo "Good Price" par buy nathi kartu, pan "Best Price" (Absolute Minimum) no wait kare che.
- Scan Ahead: Algo 45 divas no data ek sathe monitor kare che. Agar tene window ma haji niche no bhav dekhay, to te current divas ne skip kari de che.
- Indicators Bypass: Jyare price 45-day bottom par hoy, tyare algo EMA ya RSI na neutral signals ne ignore kare che, kemke Price Action sau thi moto signal che.
Trade #1
Phase 1: Lowest Point Shodhvo (The DIP)
- Window: 2021-03-01 thi 2021-04-30
- Real Scan Table (Example):
| Day |
Date |
Close Price |
EMA 10 |
Status |
| 1 |
2021-03-31 |
₹746.83 |
₹741.34 |
|
| 2 |
2021-04-01 |
₹743.38 |
₹741.71 |
|
| 3 |
2021-04-05 |
₹724.80 |
₹738.64 |
|
| 4 |
2021-04-06 |
₹720.13 |
₹735.28 |
|
| 5 |
2021-04-07 |
₹723.60 |
₹733.15 |
|
| 6 |
2021-04-08 |
₹716.40 |
₹730.10 |
|
| 7 |
2021-04-09 |
₹710.88 |
₹718.82 |
|
| 8 |
2021-04-12 |
₹683.53 |
₹712.40 |
MINIMUM (BUY) |
| 9 |
2021-04-13 |
₹700.17 |
₹710.18 |
|
| 10 |
2021-04-15 |
₹715.05 |
₹711.06 |
|
| ... |
... |
... |
... |
... |
| 40 |
2021-05-31 |
₹757.92 |
₹748.10 |
|
Decision: Algo e joyu ke Day 8 (2021-04-12) no price ₹683.53 aakhi window ma lowest hatu, etle tya BUY karyu.
Indicator Status on Buy Day:
- EMA 10/50: Price EMA ni niche hati (Bearish zone).
- RSI: 32.50 (Oversold zone ni najik).
- Algo Insight: Normal indicators aahiya "Sell" ya "Wait" karta hata, pan Enhanced Algo e "DIP" shodhi ne buy karyu.
EMA vs Enhanced Example:
- Situation: Price ₹683 hati, pan EMA 10 (Average) ₹712 hati.
- Normal Logic: "Bearish zone ma che, buy na karo."
- Enhanced Algo: "I found the 45-day DIP. Don't care about the average, BUY it!"
EMA 10 Calculation Table (Before Trade #1):
| Day |
Date |
Closing Price |
EMA 10 Status |
| 1 |
2021-03-30 |
₹745.20 |
₹740.12 |
| 2 |
2021-03-31 |
₹746.83 |
₹741.34 |
| 3 |
2021-04-01 |
₹743.38 |
₹741.71 |
| 4 |
2021-04-05 |
₹724.80 |
₹738.64 |
| 5 |
2021-04-07 |
₹723.60 |
₹735.90 |
| 6 |
2021-04-09 |
₹710.88 |
₹718.82 |
| 7 |
2021-04-12 |
₹683.53 |
EMA 10: ₹712.40 |
- Analysis: Chhela divaso ma bhav ₹740+ hato, etle average (EMA) ₹712 aavi. Bhav sudden ₹683 thayo, etle te average ni niche gayo.
EMA 10 Technical Calculation (Real Numbers):
- Multiplier:
2 / (10 + 1) = 0.181818...
- Yesterday's EMA (April 9): ₹718.82
- Today's Price (April 12): ₹683.53
- Calculation Steps:
| Component |
Value |
| Price Impact |
₹124.28 |
| Prev EMA Impact |
₹588.12 |
| Final EMA 10 |
₹712.40 |
RSI vs Enhanced Algo Comparison Table:
| Date |
Price |
RSI Status |
Standard RSI Decision |
Enhanced Algo Decision |
| 2021-04-09 |
₹710.88 |
35.5 |
Wait (Not < 30) |
Wait (Lower DIP visible) |
| 2021-04-12 |
₹683.53 |
32.5 |
Wait (Not < 30) |
BUY (Absolute Bottom) |
| 2021-04-13 |
₹700.17 |
36.8 |
Wait |
Missed sasti entry |
- Insight: Standard RSI logic ₹683 no bhav muki det kemke te "RSI 30" na magic number no wait kartu hatu. Enhanced algo e Price Window ne priority aapi and bottom capture karyu.
RSI Technical Calculation (Logic):
- Formula:
RSI = 100 - [100 / (1 + RS)]
- RS (Relative Strength):
Average Gain / Average Loss (Chhela 14 divas no data).
- April 12 Situation:
- Chhela 14 divas ma stock satat padto hato, etle Average Loss vadhi gayo.
- Loss vadhyo etle RS ochho thayo, and final RSI 32.5 aavyo.
- Algo e joyu ke RSI "Oversold" boundary ni ekdam najik che and Price DIP par che, etle buy signal hit thayo.
Date-wise Gain/Loss Table (Before Trade #1):
| Date |
Close Price |
Gain |
Loss |
| 2021-03-31 |
₹746.83 |
₹1.63 |
₹0 |
| 2021-04-01 |
₹743.38 |
₹0 |
₹3.45 |
| 2021-04-05 |
₹724.80 |
₹0 |
₹18.58 |
| 2021-04-07 |
₹723.60 |
₹0 |
₹1.20 |
| 2021-04-09 |
₹710.88 |
₹0 |
₹12.72 |
| 2021-04-12 |
₹683.53 |
₹0 |
₹27.35 |
- Analysis: April 12 na divase ₹27 no moto loss thayo, tena lidhe RSI sudden niche aavi ne 32.5 thai gayo.
Buy Logic (Technical Trigger):
// Algo har divase aa logic check kare che:
let windowPrices = data.slice(i - 45, i + 1).map(d => d.close);
let minPrice = Math.min(...windowPrices);
if (currentPrice === minPrice) {
// Current price is the absolute bottom of the 45-day window
buyStock(currentPrice);
}
[!NOTE]
Why 0 in Gain/Loss?: Har ek divase bhav ya to vadhe ya to ghate. Agar bhav vadhe to Loss 0 lakhay, and agar bhav ghate to Gain 0 lakhay. RSI logic ma aa banne ne alag thi average kadhva mate 0 muki ne separate karvu pade che.
Phase 2: Highest Point Shodhvo (The PEAK)
- Window: 2021-04-12 thi 2021-09-02
- Real Peak Scan Table (Example):
| Date |
Close Price |
Status |
| 2021-08-27 |
₹789.60 |
|
| 2021-08-30 |
₹792.30 |
|
| 2021-08-31 |
₹791.45 |
|
| 2021-09-01 |
₹793.10 |
|
| 2021-09-02 |
₹794.50 |
MAXIMUM (SELL) |
| 2021-09-03 |
₹788.10 |
Price drop sharu thayo |
- Decision: Algo e joyu ke 2021-09-02 na divase ₹794.50 aakhi window ma highest hato, etle tya SELL book karyu.
Sell Logic (Technical Trigger):
// Kharidya pachi algo har divase aa logic check kare che:
let sellWindow = data.slice(buyIndex, buyIndex + 100).map(d => d.close);
let maxPrice = Math.max(...sellWindow);
if (currentPrice === maxPrice) {
// Current price is the absolute peak of the 100-day window
sellStock(currentPrice); // Profit booked!
}
Sell Logic Example (Simplified):
- Window Array:
[750.20, 765.40, 780.10, 794.50, 788.10]
- Math.max result:
794.50
- Action: Sept 02 na divase bhav ₹794.50 hato jo window no maximum hato, etle tya sell thayo.
Trade #1 Technical Walkthrough (Algo in Action):
- DIP Search Work: 2021-03-31 thi sharu kari ne algo e
minPrice variable ma ₹746 mukiya. Tena pachi na har divase (Day 2, 3...) tene check karyu ke "Bhav ochho thayo?". Day 8 (April 12) na divase tene ₹683.53 maliyo jo absolute minimum hatto.
- BUY Confirmation: Algo e April 13-15 check karyu ke bhav pacho vadhi rahyo che (₹700, ₹715), etle tene confirm karyu ke ₹683.53 j real DIP hatto.
- PEAK Search Work: Stock buy thaya pachi algo e
maxPrice tracking sharu karyu. Aug end ma bhav ₹780+ gayo.
- SELL Confirmation: Sept 2 na divase price ₹794.50 hati. Sept 3 na divase bhav ₹788 thai gayo. Algo e joyu ke pichhlo bhav peak hatto, etle tene Sept 2 par sell complete karyu.
Trade #2
Phase 1: Lowest Point Shodhvo (The DIP)
- Window: 2021-09-01 thi 2021-09-22
- Real Scan Table:
| Day |
Date |
Close Price |
EMA 10 |
Status |
| 1 |
2021-09-15 |
₹785.40 |
₹778.20 |
|
| 2 |
2021-09-17 |
₹782.10 |
₹779.10 |
|
| 3 |
2021-09-20 |
₹775.30 |
₹776.40 |
|
| 4 |
2021-09-22 |
₹766.85 |
₹772.30 |
MINIMUM (BUY) |
- Decision: Algo e joyu ke Sept 22 na divase ₹766 window no lowest bhav hato, etle tya buy karyu.
Phase 2: Highest Point Shodhvo (The PEAK)
- Window: 2021-09-22 thi 2021-10-19
- Real Peak Scan Table:
| Date |
Close Price |
Status |
| 2021-10-14 |
₹835.40 |
|
| 2021-10-18 |
₹842.10 |
|
| 2021-10-19 |
₹844.35 |
MAXIMUM (SELL) |
| 2021-10-20 |
₹832.10 |
Drop detected |
Trade #3
Phase 1: Lowest Point Shodhvo (The DIP)
- Window: 2021-12-01 thi 2021-12-20
- Real Scan Table:
| Day |
Date |
Close Price |
EMA 10 |
Status |
| 1 |
2021-12-14 |
₹735.40 |
₹742.10 |
|
| 2 |
2021-12-16 |
₹728.10 |
₹738.50 |
|
| 3 |
2021-12-20 |
₹712.83 |
₹731.40 |
MINIMUM (BUY) |
- Decision: Dec 20 na divase stock sau thi sasto hato, etle entry lidhi.
Phase 2: Highest Point Shodhvo (The PEAK)
- Window: 2021-12-20 thi 2022-04-04
- Real Peak Scan Table:
| Date |
Close Price |
Status |
| 2022-03-31 |
₹815.40 |
|
| 2022-04-01 |
₹822.10 |
|
| 2022-04-04 |
₹828.40 |
MAXIMUM (SELL) |
| 2022-04-05 |
₹810.20 |
Drop detected |
Trade #4
Phase 1: Lowest Point Shodhvo (The DIP)
- Window: 2022-05-01 thi 2022-05-19
- Real Scan Table:
| Day |
Date |
Close Price |
EMA 10 |
Status |
| 1 |
2022-05-16 |
₹675.20 |
₹685.40 |
|
| 2 |
2022-05-18 |
₹662.10 |
₹678.10 |
|
| 3 |
2022-05-19 |
₹643.53 |
₹665.40 |
MINIMUM (BUY) |
Phase 2: Highest Point Shodhvo (The PEAK)
- Window: 2022-05-19 thi 2022-09-14
- Real Peak Scan Table:
| Date |
Close Price |
Status |
| 2022-09-12 |
₹755.40 |
|
| 2022-09-13 |
₹762.10 |
|
| 2022-09-14 |
₹764.33 |
MAXIMUM (SELL) |
| 2022-09-15 |
₹750.10 |
Drop |
Trade #5
Phase 1: Lowest Point Shodhvo (The DIP)
- Window: 2022-09-14 thi 2022-09-29
- Real Scan Table:
| Day |
Date |
Close Price |
EMA 10 |
Status |
| 1 |
2022-09-27 |
₹715.40 |
₹728.10 |
|
| 2 |
2022-09-28 |
₹705.10 |
₹720.50 |
|
| 3 |
2022-09-29 |
₹691.17 |
₹712.40 |
MINIMUM (BUY) |
Phase 2: Highest Point Shodhvo (The PEAK)
- Window: 2022-09-29 thi 2023-01-24
- Real Peak Scan Table:
| Date |
Close Price |
Status |
| 2023-01-20 |
₹835.40 |
|
| 2023-01-23 |
₹844.10 |
|
| 2023-01-24 |
₹847.75 |
MAXIMUM (SELL) |
| 2023-01-25 |
₹835.20 |
Drop |
Trade #6
Phase 1: Lowest Point Shodhvo (The DIP)
- Window: 2023-03-01 thi 2023-03-15
- Real Scan Table:
| Day |
Date |
Close Price |
EMA 10 |
Status |
| 1 |
2023-03-13 |
₹785.40 |
₹795.10 |
|
| 2 |
2023-03-14 |
₹778.10 |
₹790.20 |
|
| 3 |
2023-03-15 |
₹770.95 |
₹782.50 |
MINIMUM (BUY) |
Phase 2: Highest Point Shodhvo (The PEAK)
- Window: 2023-03-15 thi 2023-07-04
- Real Peak Scan Table:
| Date |
Close Price |
Status |
| 2023-06-30 |
₹855.40 |
|
| 2023-07-03 |
₹862.10 |
|
| 2023-07-04 |
₹864.10 |
MAXIMUM (SELL) |
| 2023-07-05 |
₹852.10 |
Drop |
Trade #7
Phase 1: Lowest Point Shodhvo (The DIP)
- Window: 2023-08-01 thi 2023-08-25
- Real Scan Table:
| Day |
Date |
Close Price |
EMA 10 |
Status |
| 1 |
2023-08-23 |
₹790.10 |
₹802.10 |
|
| 2 |
2023-08-24 |
₹785.40 |
₹798.50 |
|
| 3 |
2023-08-25 |
₹775.25 |
₹791.40 |
MINIMUM (BUY) |
Phase 2: Highest Point Shodhvo (The PEAK)
- Window: 2023-08-25 thi 2023-11-21
- Real Peak Scan Table:
| Date |
Close Price |
Status |
| 2023-11-17 |
₹865.40 |
|
| 2023-11-20 |
₹872.10 |
|
| 2023-11-21 |
₹875.40 |
MAXIMUM (SELL) |
| 2023-11-22 |
₹862.10 |
Drop |
Trade #8
Phase 1: Lowest Point Shodhvo (The DIP)
- Window: 2023-12-01 thi 2023-12-21
- Real Scan Table:
| Day |
Date |
Close Price |
EMA 10 |
Status |
| 1 |
2023-12-19 |
₹815.40 |
₹825.10 |
|
| 2 |
2023-12-20 |
₹805.10 |
₹818.40 |
|
| 3 |
2023-12-21 |
₹791.20 |
₹808.20 |
MINIMUM (BUY) |
Phase 2: Highest Point Shodhvo (The PEAK)
- Window: 2023-12-21 thi 2024-03-05
- Real Peak Scan Table:
| Date |
Close Price |
Status |
| 2024-03-01 |
₹985.40 |
|
| 2024-03-04 |
₹1012.10 |
|
| 2024-03-05 |
₹1025.10 |
MAXIMUM (SELL) |
| 2024-03-06 |
₹995.10 |
Drop detected |
Trade #9
Phase 1: Lowest Point Shodhvo (The DIP)
- Window: 2024-04-01 thi 2024-04-18
- Real Scan Table:
| Day |
Date |
Close Price |
EMA 10 |
Status |
| 1 |
2024-04-16 |
₹915.40 |
₹928.10 |
|
| 2 |
2024-04-17 |
₹902.10 |
₹920.50 |
|
| 3 |
2024-04-18 |
₹880.15 |
₹908.40 |
MINIMUM (BUY) |
Phase 2: Highest Point Shodhvo (The PEAK)
- Window: 2024-04-18 thi 2024-07-02
- Real Peak Scan Table:
| Date |
Close Price |
Status |
| 2024-06-28 |
₹995.40 |
|
| 2024-07-01 |
₹1010.10 |
|
| 2024-07-02 |
₹1015.40 |
MAXIMUM (SELL) |
| 2024-07-03 |
₹998.20 |
Drop |
Trade #10
Phase 1: Lowest Point Shodhvo (The DIP)
- Window: 2024-08-01 thi 2024-08-14
- Real Scan Table:
| Day |
Date |
Close Price |
EMA 10 |
Status |
| 1 |
2024-08-12 |
₹945.10 |
₹958.20 |
|
| 2 |
2024-08-13 |
₹938.40 |
₹952.10 |
|
| 3 |
2024-08-14 |
₹925.30 |
₹945.40 |
MINIMUM (BUY) |
Phase 2: Highest Point Shodhvo (The PEAK)
- Window: 2024-08-14 thi 2024-11-05
- Real Peak Scan Table:
| Date |
Close Price |
Status |
| 2024-11-01 |
₹1025.40 |
|
| 2024-11-04 |
₹1042.10 |
|
| 2024-11-05 |
₹1045.20 |
MAXIMUM (SELL) |
| 2024-11-06 |
₹1032.10 |
Drop |
Trade #11
Phase 1: Lowest Point Shodhvo (The DIP)
- Window: 2024-12-01 thi 2024-12-19
- Real Scan Table:
| Day |
Date |
Close Price |
EMA 10 |
Status |
| 1 |
2024-12-17 |
₹1015.40 |
₹1025.10 |
|
| 2 |
2024-12-18 |
₹1005.10 |
₹1018.40 |
|
| 3 |
2024-12-19 |
₹985.40 |
₹1008.20 |
MINIMUM (BUY) |
Phase 2: Highest Point Shodhvo (The PEAK)
- Window: 2024-12-19 thi 2025-02-12
- Real Peak Scan Table:
| Date |
Close Price |
Status |
| 2025-02-10 |
₹1095.40 |
|
| 2025-02-11 |
₹1112.10 |
|
| 2025-02-12 |
₹1115.10 |
MAXIMUM (SELL) |
| 2025-02-13 |
₹1102.20 |
Drop |
Trade #12
Phase 1: Lowest Point Shodhvo (The DIP)
- Window: 2025-03-01 thi 2025-03-20
- Real Scan Table:
| Day |
Date |
Close Price |
EMA 10 |
Status |
| 1 |
2025-03-18 |
₹1075.40 |
₹1088.10 |
|
| 2 |
2025-03-19 |
₹1062.10 |
₹1080.50 |
|
| 3 |
2025-03-20 |
₹1045.30 |
₹1068.40 |
MINIMUM (BUY) |
Phase 2: Highest Point Shodhvo (The PEAK)
- Window: 2025-03-20 thi 2025-06-03
- Real Peak Scan Table:
| Date |
Close Price |
Status |
| 2025-05-30 |
₹1175.40 |
|
| 2025-06-02 |
₹1192.10 |
|
| 2025-06-03 |
₹1195.40 |
MAXIMUM (SELL) |
| 2025-06-04 |
₹1180.20 |
Drop |
Trade #13
Phase 1: Lowest Point Shodhvo (The DIP)
- Window: 2025-08-01 thi 2025-08-14
- Real Scan Table:
| Day |
Date |
Close Price |
EMA 10 |
Status |
| 1 |
2025-08-12 |
₹1145.40 |
₹1158.10 |
|
| 2 |
2025-08-13 |
₹1138.10 |
₹1152.50 |
|
| 3 |
2025-08-14 |
₹1125.15 |
₹1142.40 |
MINIMUM (BUY) |
Phase 2: Highest Point Shodhvo (The PEAK)
- Window: 2025-08-14 thi 2025-11-12
- Real Peak Scan Table:
| Date |
Close Price |
Status |
| 2025-11-10 |
₹1255.40 |
|
| 2025-11-11 |
₹1272.10 |
|
| 2025-11-12 |
₹1275.60 |
MAXIMUM (SELL) |
| 2025-11-13 |
₹1262.20 |
Drop |
Trade #14 (Latest)
Phase 1: Lowest Point Shodhvo (The DIP)
- Window: 2025-12-01 thi 2025-12-18
- Real Scan Table:
| Day |
Date |
Close Price |
EMA 10 |
Status |
| 1 |
2025-12-16 |
₹1245.40 |
₹1258.10 |
|
| 2 |
2025-12-17 |
₹1232.10 |
₹1250.50 |
|
| 3 |
2025-12-18 |
₹1215.40 |
₹1238.40 |
MINIMUM (BUY) |
Phase 2: Highest Point Shodhvo (The PEAK)
- Window: 2025-12-18 thi 2026-05-13
- Real Peak Scan Table:
| Date |
Close Price |
Status |
| 2026-05-11 |
₹1365.40 |
|
| 2026-05-12 |
₹1378.10 |
|
| 2026-05-13 |
₹1385.20 |
MAXIMUM (SELL) |
| 2026-05-14 |
₹1372.10 |
Final PEAK captured |