PROTECTED SOURCE SCRIPT
Mis à jour

C|M Capital (Market Structure Pro)

2 158
CM Capital (Market Structure Pro)

Overview:
The CM Capital (Market Structure Pro) Indicator is a groundbreaking tool for traders seeking a comprehensive market analysis. This closed-source script merges multiple facets of market dynamics into a single, user-friendly interface, designed to enhance decision-making by providing a multi-dimensional view of market behavior. By combining advanced market structure detection, liquidity event identification, Fair Value Gap analysis, and session-specific insights, this indicator offers traders a strategic advantage in navigating the complexities of financial markets.

Key Functionalities:


Market Structure Insights:
Break of Structure (BOS) and Market Structure Shifts (MSS):
Methodology: Our approach uses fractal analysis coupled with custom algorithms to dissect price movements, identifying pivotal moments where market structure breaks or shifts. The script evaluates candle patterns, volume data, and price momentum to flag these events.
Customization: Users can choose between candle close or wick confirmations and select from various line styles for visualization, tailoring the sensitivity to match their trading strategy, whether it's scalping or swing trading.
Utility: These markers act as early signals for trend changes, allowing traders to prepare for potential reversals or continuations, especially useful in volatile markets where timely decisions are crucial.

Structure Strength:
Highs and Lows Definition: The 'Structure Strength' setting in this indicator directly influences the identification of structure highs and lows. It's not just about detecting market structure; it's about defining what constitutes a significant high or low based on your trading horizon.
Swing vs. Internal Structure:
Lower Strength: Opting for a lower strength setting will highlight more extreme, swing-type structures. This means the indicator will mark out only the most pronounced highs and lows, which are ideal for traders focusing on broader market swings or longer-term trends.
Higher Strength: Conversely, increasing the strength level plots more internal structure levels. This setting is perfect for traders who want to dive into the market's micro-movements, offering insights into potential support and resistance within ongoing trends, essentially capturing more reactive and detailed price action.
Strategic Application: This adjustable parameter allows traders to zoom in or out on the market structure, aligning with their trading style or the specific market conditions they're navigating. Whether you're looking to catch significant market turns or to finesse entries and exits within a trend, the structure strength setting provides the granularity needed for nuanced market analysis.

Liquidity Sweeps:
Detection: Beyond traditional price action analysis, our indicator incorporates a unique method to spot liquidity sweeps. By analyzing price movements against historical support/resistance zones, it highlights instances where significant orders might have been absorbed, suggesting areas of potential price reversal or continuation.
Visualization: Liquidity sweeps are visually marked with customizable colors and an 'X' label, making them instantly recognizable. This feature is particularly beneficial for traders looking to enter or exit trades based on market inefficiencies or anticipated institutional activity.
Application: Traders can use these signals to anticipate where the market might react strongly, either as support for entries or as a caution for exits, enhancing trade precision.

Fair Value Gaps (FVGs):
Identification: Our proprietary FVG detection algorithm looks for price discrepancies over recent bars, signaling where the market could aim to rebalance. This is not merely about spotting gaps but understanding their context within the market's flow.
Enhanced Visualization: Users can extend FVGs across the chart, providing a clearer view of potential mean reversion points or continuation levels, aiding in setting targets or stop-losses.
Strategic Use: FVGs serve as dynamic levels where traders might expect price action to revisit, offering opportunities for mean reversion trades or confirming trend strength.

Session Visualization:
Session Markers: By delineating Asia, London, and New York session times, the indicator helps traders recognize session-specific volatility, trends, and liquidity conditions. Each session can be customized for color and duration, aligning with various trading strategies.
Timeframe Correlation: Integrating session analysis with structural and liquidity insights allows for a strategy where trades are timed not just by price action but by when in the global market cycle they occur, potentially increasing the effectiveness of entry and exit points.

Watermark Display:
Personalization: Add a personal touch or brand identity to your charts with customizable text and color options for the watermark, enhancing both the aesthetic and functional aspects of your trading setup.

Originality:
This script's originality lies in its holistic approach to market analysis. The integration of these diverse yet synergistic components provides a unique toolset:
Confluence of Signals: Each element enhances the others, creating a confluence where structural changes, liquidity events, and time-based market conditions are analyzed in concert, offering a more complete trading signal than isolated indicators.
Customization for Diverse Trading Styles: From high-frequency scalping to long-term trend following, the script's flexibility caters to a broad spectrum of trading strategies by allowing adjustments in sensitivity, visualization, and application.

How to Use:
Setup: Add the script to your chart and explore the settings in the input panel. Customize the visual and functional aspects to align with your trading style.

Strategy Application:

Use BOS/MSS for trend confirmation, liquidity sweeps for entry/exit precision, FVGs for mean reversion opportunities, and session markers to time your trades optimally.
Consider combining signals for stronger trade validation; for instance, a BOS during the London session might be more significant if it coincides with a liquidity sweep and an FVG from the Asian session.
Notes de version
Update/Debugging

FVGs
Fully filled FVGs will now be removed from the chart to help with clutter. Including a max of 15 FVGs being printed on any chart at a time to help with over printed FVGs and historical data mess.
Notes de version
Debug Update

Last update caused certain structure levels to not print properly and completely removed the MSS function. Issue has now been fixed.
Notes de version
Watermark Update:

Auto Date and symbol/pair placement added to the bottom of the screen.
Notes de version
Watermark Update

Timeframe indication added to the watermark for chart sharing clarification.
Notes de version
Update & Debug

Updates:
Watermark:
Watermark size and colour changing options for Top and Bottom watermarks for a more personalised custom feel.

FVG:
100% filled FVG's now removed to help with chart clarity. And a maximum of 20 FVGs are plotted on any given timeframe to help with clearer charts and visualisation.

Sessions:
Session labels have been moved to the top centre to remove the overlay on the current live candle.

Debugging:

Sessions are now seen on the selected timeframe and all time frames below including custom time frames.

Session history view issue fixed. Now more than 6 sessions are shown on the selected time frame helping with historical data viewing.
Notes de version
Debug:

Session settings fixed
Notes de version
Watermark Update:

Watermark has been cleaned up... Brackets have been removed from Time Frames now with a clear split marker between symbols and TFs... Also time frames are more clearly identified, Any time frame below the Hour i.e the Minute will be identified with a 'm' Hourly Tfs 'H' Daily TFs 'D' Weekly TFs 'W' Monthly TFs 'M'
Notes de version
Update:

BOS/MSS: The ability to remove the "B" & "M" Labels from the lines with extra colour changing settings for the labels and lines to help with self chart designs.
Notes de version
New Features
- Customisable B/M Label Positioning: Added "Label Position" (Above, Below, On Line) and "Label Offset Multiplier" (ATR-based) under new "LABEL SETTINGS" group for precise BOS/MSS label placement.
- Enhanced Session Visualisation: Improved `shouldVisualize` function to dynamically adjust session visibility based on timeframe multiplier, ensuring cleaner charts across all timeframes.

Improvements
- Simplified Input Labels: Renamed and streamlined input titles/tooltips (e.g., "Show BOS/MSS" to "Show BOS/MSS", "Structure Strength" to "Sensitivity") for better clarity and user experience.
- Optimized FVG Detection: Updated Fair Value Gap logic to remove redundant close price checks, improving accuracy and performance.
- ATR Integration: Added ATR (14-period) calculation for dynamic label offsets, making label positioning more adaptive to market volatility.
- Code Efficiency: Refactored array management and session drawing functions for better performance and reduced memory usage.

Bug Fixes
- Session Box Persistence: Fixed issue where session boxes could persist incorrectly after session end.
- Label Overlap: Resolved potential label overlap by integrating ATR-based offsets and precise positioning options.
- Watermark Table Reference: Corrected undefined `customWatermarkTable` reference to `bottomWatermarkTable` for consistent rendering.

Notes
- Default settings remain consistent with the previous version for seamless transition.
- Recommended to review new "LABEL SETTINGS" options to customise BOS/MSS label display to your preference.

Thank you for using C|M Capital (Market Structure Pro)! Feedback is welcome via TradingView messages.
Notes de version
New Feature: Defining Range/Implied Defining Range (DR/IDR)

Added DR/IDR boxes and lines for London (8:00–9:00 GMT), New York (13:00–14:00 GMT), and Asia (0:00–1:00 GMT) sessions.

Shows grey boxes for IDR, solid grey DR lines, dashed red IDR lines, and dotted grey midpoint lines.

You can turn each session on or off with new toggles (London DR and New York DR are on by default, Asia DR is off).

Old DR/IDR boxes are removed after 30 days to keep your chart clean.

Updated Default Settings

Market Structure: Sensitivity changed to High (was Medium) for more detailed levels.

Market Structure: Max Levels increased to 4 (was 2) to show more structure levels.

Liquidity Sweeps: Turned off by default (was on) to reduce chart clutter.

Sessions: London session changed to 8:00–11:00 GMT (was 7:30–11:00 GMT).

Watermark: Top and bottom text size set to Small (was Normal) for a cleaner look.

Improvements

Adjusted session times to better match standard market hours.

Improved chart performance by cleaning up old DR/IDR boxes.

Set defaults to better fit common trading strategies.

Thank you for using C|M Capital (Market Structure Pro)!
The C|M Capital Team



Notes de version
Added a max time frame setting to the DR/IDR to help with clutter.
Notes de version
Update and Bug Fix

DR/IDR now prints live, default times fixed to true DR/IDR times.
Notes de version
Update & Bug/Time Fixes:

All on and off toggles have been moved to the top of the settings for easy on and off options.

Time settings are fixed and will auto update when clocks move forward or back!
Notes de version
Update and clean up on the overall settings.
Notes de version
Session label Debug Fixed
Notes de version
C|M Capital (Market Structure Pro) - Update

This update refines the indicator for enhanced clarity and functionality in market structure analysis:

Removed Liquidity Sweep Feature: Eliminated the liquidity sweep detection and visualization (including settings for sweep style, color, and labels) to streamline the indicator, as per user preference to avoid complex sweep logic, Sweeps where not functioning the way they was supposed to.

Unified FVG Colors: Replaced separate bullish (green) and bearish (red) FVG colors with a single light gray (black, 80% transparency) for consistent visualization.

Added Inverted FVG (iFVG) Detection: Introduced logic to highlight iFVGs in blue when a bullish FVG overlaps a bearish one (or vice versa), improving identification of potential reversal zones.

Updated Session Times: Adjusted session times to align with standard trading hours (Asia: 2300-0700, London: 0800-1300, New York: 1430-1800, in UK time) for better accuracy.

Simplified Timezone Handling: Replaced individual session timezones (asiaTimezone, londonTimezone, newYorkTimezone) with a unified "Europe/London" timezone for consistency and removed the unused sessionDuration parameter from the drawSessionBox function.

These changes enhance the indicator’s focus on market structure, FVGs, and session analysis while maintaining performance and visual clarity. Feedback is welcome!

Notes de version
Release Notes:

We are excited to announce an updated version of the "C|M Capital (Market Structure Pro)" indicator, bringing enhanced functionality and user customization options. This update refines the previous version by introducing new features and improving the overall trading experience.

Key changes include:

New Feature: Previous Highs/Lows Support Added support for displaying previous daily, weekly, and monthly highs and lows with customizable colors, line styles, and widths (via isDailyEnabled, dailyColor, dailyStyle, dailyWidth, etc.).
Introduced an prevHLExtend setting to extend these levels by a specified number of bars (default: 150), providing greater flexibility in tracking historical levels.

Improved Previous Highs/Lows Logic Enhanced the drawing mechanism for previous highs and lows using dynamic line extensions, ensuring cleaner visuals without the unintended dot artifacts from the older version.
Removed unnecessary plot statements that caused visual noise, maintaining focus on the drawn lines controlled by the showPrevHL toggle.

Color Customization Updates Updated default colors for daily (RGB: 25, 95, 201), weekly (RGB: 70, 184, 74), and monthly (red) highs and lows to improve chart readability.
Retained full customization options for all structure-related colors (e.g., structureHighColor, structureLowColor).

Performance and Stability Optimized the Previous Highs/Lows logic to ensure compatibility with intraday, daily, and higher timeframes (controlled by canShowDaily, canShowWeekly, canShowMonthly).
Maintained existing DR/IDR, session, BOS/MSS, and FVG functionalities without changes to their core logic.

Removed Features Removed the labelGapBars setting from the older version, simplifying the BOS/MSS label placement logic while preserving adjustable line styles.

How to Use:Enable or disable the new Previous Highs/Lows feature using the showPrevHL toggle.
Customize the appearance of these levels under the "PREVIOUS HIGHS/LOWS SETTINGS" group.
Ensure your timeframe aligns with the visibility settings (e.g., intraday for daily levels) for optimal performance.

This update enhances the indicator's utility for traders focusing on market structure analysis. We recommend testing the new features on a demo chart and adjusting settings to suit your trading strategy. For any issues or feedback, please reach out via our support channels.Happy trading! The C|M Capital Team

Notes de version
We've released an update to enhance the C|M Capital (Market Structure Pro) indicator, addressing key issues for improved functionality:

Fixes:

Timeframe Compatibility: Fixed an issue where the Previous Highs/Lows feature failed on certain timeframes due to invalid bar index calculations. The script now uses time-based coordinates (xloc.bar_time) for reliable performance across all timeframes, including 3m and 4m charts.

Namespace Error: Resolved an "undeclared identifier 'line'" error in the f_drawPrevHL function, ensuring stable line-drawing for daily, weekly, and monthly highs/lows.

Watermark Display: Corrected an issue where the watermark text might not display consistently on some charts, ensuring the customizable watermark (top and bottom text) appears correctly with the selected size and color settings.


Bugs are all fixed and indicator works how it is supposed to.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.