PROTECTED SOURCE SCRIPT

Market Rhythm

119
Market Rhythm

Overview
If you’re a price-action enthusiast who loves to stay on top of structural shifts in the market, Market Rhythm is here to supercharge your charting experience! This script automatically identifies swing points (HH, LH, HL, LL), detects breaks of structure (BOS), flags changes of character (CHoCH), and offers an optional Trade Tip to guide your next move. It also provides a sleek table summarizing the latest signals so you can confirm momentum or pivot-based ideas at a glance.

What It Does
Swing Detection

Spots the last few pivot highs and lows on your chart.
Labels them as HH (Higher High), LH (Lower High), HL (Higher Low), or LL (Lower Low).
You can display all identified swings or only the most recent ones.
Adaptive Swing Logic

Optionally invert your swing lengths when the script detects a bearish trend, allowing it to adapt pivot detection automatically.
This means if the market flips to a downtrend, pivot detection reconfigures itself in real time.
Break of Structure (BOS)

If price breaks above the previous swing high or below the previous swing low, the script prints a BOS line on the chart.
You can choose whether to confirm breakouts via candle closes or wicks.
CHoCH (Change of Character)

When a BOS flips from bullish to bearish (or vice versa) against the prior direction, it’s renamed CHoCH for added clarity.
Color-coded lines and labels let you instantly see if the market’s “character” is reversing.
Optional Trade Tip

The script can suggest “Look for Long” or “Look for Short” based on your last pivot type and overall trend direction.
This “Trade Tip” is completely optional: enable or disable it in the settings, and the table reconfigures itself automatically.
Information Table

A compact on-chart table gives you an at-a-glance summary of:
Trend – Are we bullish, bearish, or uncertain?
Last BOS – If there’s a recent break of structure, how many bars ago did it happen?
Last CHoCH – If the market made a sudden reversal, how many bars back?
Trade Tip (Optional) – Summarizes whether conditions favor a long or short setup, or if it’s best to wait.
Alerts

Built-in alert conditions let you know when a BOS or CHoCH happens (bullish or bearish).
Turn them on to receive notifications without staring at the screen all day.
Chart Elements
Swing Labels: “HH,” “LH,” “HL,” “LL” near the pivot bars.
BOS & CHoCH Lines: Solid/dashed/dotted lines drawn across your chart, marking the level of structure that got broken.
Color Codes: Bullish signals are tinted in blue-ish tones, bearish signals in pink/purple-ish tones, making it easy to parse your chart visually.
Trade Tip Row: If enabled, instantly highlights “Look for Long” or “Look for Short” in a color-coded cell (blue for long, purple for short, gray if none).
Key Settings
Swing Points

Swing Points Display: Show all pivots, only the last set, or no pivots at all.
Invert Right Swing in Bearish Trend: Automatically swap your “Right Swing Length (High)” and “Right Swing Length (Low)” once the script detects a bearish trend (signaled by the most recent CHoCH).
Left Swing Length / Right Swing Length High/Low: Control how sensitive pivot detection is for highs vs. lows.
Pivot Source: Decide if your pivots are based on candle closes or wicks.
BOS Settings

Show BOS: Hide or reveal the Break of Structure lines entirely.
BOS Confirmation: Candle closes or wicks needed for a “true” breakout.
Line Style / Width / Color: Customize the BOS lines to your liking.
Show Only Last BOS: Show only the freshest BOS or keep historical ones on the chart.
CHoCH Settings

Show CHoCH: Rename the first opposite BOS to CHoCH if desired.
Bullish/Bearish Colors: Pick your favorite color theme for CHoCH lines.
Line Style / Width / Show Only Last CHoCH: Similar customizing options as BOS lines.
Table Settings

Show Table: Toggle the entire summary table on/off.
Position & Text Size: Choose table location (top-left, bottom-right, etc.) and text size (small to huge).
Show 'Trade Tip' row: Decide whether to add a fourth row that suggests potential trade direction. If disabled, the table has only three rows (Trend, Last BOS, and Last CHoCH).
Alerts

Several alert conditions are built in (e.g., “Bullish BOS Alert,” “Bearish BOS Alert,” “CHoCH Alert,” etc.), so you can set notifications for real-time structural shifts.
Why You’ll Love It
Visual Clarity: No more guesswork on which pivot was broken or whether a CHoCH just took place—color-coded lines and labels handle it.
Flexible Pivot Logic: Candle closes vs. wicks, separate right swing lengths for highs and lows, and an adaptive approach if the market goes bearish.
Quick Glance Table: Summaries of the latest signals keep you in the loop without cluttering your chart.
Trade Tip Option: Let the script gently nudge you toward potential bullish or bearish setups—only if you want it to!
Alerts for Everything: BOS and CHoCH can trigger alerts so you never miss a key structural change.
Give Market Rhythm a go, and watch your chart transform into a dynamic story of structure breaks, pivot swings, and potential trade cues. Whether you’re a short-term scalper or a higher-timeframe swing trader, this tool aims to simplify your analysis and keep you laser-focused on what matters.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.