Advanced Market Structure by MoonPipz
- Indicatori
-
Sarvaddnya Pathrabe
Hello, We are creator of MoonPipz.
After years of manual trading, revenge entries, and chasing holy grails that didn't exist, we started coding indicators that solve real problems like:
Seeing clear trends without drowning in noise
Catching high-probability divergences early - Versione: 1.1
Overview
This indicator marks market structure on the chart of any symbol and timeframe. It finds swing highs and swing lows, labels each swing, connects the swings with a line, and marks when price closes beyond the last swing. Each event can trigger its own alert, and each alert can be switched on or off in the inputs. The indicator is a charting and analysis tool. It does not open or close trades, and it does not predict price.
What is drawn on the chart
Each confirmed swing receives one of four labels: Higher High (HH), Higher Low (HL), Lower High (LH) or Lower Low (LL). Higher highs and higher lows use one color, and lower highs and lower lows use another. A line connects the swings in order. If two swing highs or two swing lows appear in a row, the line keeps the more extreme one. When a candle closes above the last swing high or below the last swing low, a dashed line and a text label are drawn at the broken level. If the break is in the direction of the current structure, it is labeled Break of Structure (BOS). If the break is against the current structure, it is labeled Change of Character (CHoCH), and the structure direction changes. The first break after the indicator starts is labeled BOS, because no direction is known yet.How swings are found
A swing high is a bar whose high is not exceeded by the bars to its left and is higher than the bars to its right. A swing low works the same way in the other direction. The number of bars on each side is set by the Swing length input. A swing is confirmed only after that many bars have formed to its right. For this reason a label appears a few candles after the actual high or low, and the delay equals the Swing length value.
Behavior to be aware of
A label can be replaced. If a swing high is followed by a higher swing high before any swing low is confirmed, the earlier label and line segment are removed and drawn again at the higher point. The same applies to swing lows.
Break of Structure and Change of Character are evaluated on closed candles only. A wick beyond the level is not counted.
On the current, unfinished candle nothing is calculated. All events are processed when a candle closes.
Alerts
Alerts are available for these eight events: Higher High, Higher Low, Lower High, Lower Low, Bullish BOS, Bearish BOS, Bullish CHoCH and Bearish CHoCH. Each one has its own on/off input.
Swing label alerts are sent when the swing is confirmed, which is after the delay described above. Break alerts are sent when the breaking candle closes. Alerts are not sent for events found while the history is loaded when the indicator is attached. Only events on newly closed candles can send alerts.
Alert messages contain the symbol, timeframe, event name and price, for example: EURUSD H1: Bullish CHoCH @ 1.08520.
Alerts can be delivered as a pop-up window, a sound, a push notification or an email. Push notifications require a MetaQuotes ID to be entered in the terminal settings, and email requires the email settings in the terminal to be filled in. The sound option plays the file named in the input, which must exist in the Sounds folder of the terminal.
Input parameters
Structure
Swing length: number of bars on each side used to define a swing. Smaller values give more swings, and larger values give fewer swings. Default 5.
Bars of history to draw: how many recent bars are processed and drawn. Default 1500.
Display
Show labels, show zigzag line and show BOS/CHoCH can each be switched on or off. Label font size, zigzag line width, and the colors for bullish structure, bearish structure, the zigzag line and CHoCH can be changed.
Alerts, events
A separate on/off input for each of the eight events listed above.
Alerts, delivery
Pop-up, sound with file name, push notification and email.
Notes
The indicator draws chart objects (lines and text). They are removed when the indicator is removed from the chart, and they are drawn again when the timeframe or symbol changes.
A very small Swing length on a low timeframe can produce many labels. If the chart becomes crowded, increase the Swing length.
If you have a question or find a problem, please write it in the comments section of this page, with the symbol, timeframe and input settings used, so the behavior can be checked.
Risk notice- Trading involves risk. Market structure shown by this indicator describes past price movement and does not indicate what will happen next. The indicator is provided for analysis and education and is not financial advice.
