BMS/SMS Market-Structure Indicator from a Hindi Trading Lecture
Break and shift of market structure rules transcribed from a 43-minute video and encoded so my hand-marked monthly charts reproduce exactly.
Fakeout sweeps reclaimed within three bars, structure breaks with and without rotation swings, custom tie-tolerant swings instead of ta.pivot, defaults justified against two real stock charts, and a data-window readback verification path.

- Rules transcribed from the source lecture, not paraphrased
- Tie-tolerant swing detector where ta.pivot fails
- Defaults validated against my hand-marked charts
- Data-window readback for bar-level verification
A popular Hindi lecture on market structure defines a break of market structure as a fakeout (a sweep of a swing reclaimed within three bars) followed by a close through the intervening high or low, with probability depending on whether a rotation swing sits in between, and a shift of market structure as two breaks against the old trend without a fakeout. The lecture was transcribed with a local speech model (and one hallucinated segment re-run without voice detection), then the rules were encoded in Pine v6.
Defaults were not chosen by taste. I had hand-marked specific sweeps and breaks on two monthly stock charts, and the swing length and swing detector were tuned until both reproduced. That forced a custom tie-tolerant swing finder because one key low was an equal-lows double bottom that the built-in pivot function rejects, and it showed that a 50 percent filter belongs only on the structure layer, since filtering sweeps removed the very sweep being tested.
Verification uses hidden data-window plots (BMS code, swept level, level broken) read back bar by bar on TradingView Desktop, driven by small Node scripts over the DevTools Protocol.
How it works
- Transcribe the lecture and extract rule statements
- Detect swings with tie tolerance and track sweeps
- Classify BMS (with/without rotation) and SMS events
- Plot verification codes to the data window
- Compare against hand-marked reference charts and adjust defaults
Software and automation are infrastructure, not financial advice. No performance guarantees. Every live system needs staged testing, risk limits, and owner approval.