OPEN-SOURCE SCRIPT
Amplitude State Simple

Amplitude State Simple
Amplitude State Simple is a market behavior indicator designed to identify whether price movement is currently expanding, contracting, or remaining relatively stable by analyzing changes in swing amplitude over time.
Rather than measuring trend direction alone, this indicator focuses on the magnitude of movement and compares recent swing behavior against a historical baseline to determine whether market activity is increasing, decreasing, or remaining balanced.
The goal is to provide a simplified view of changing market conditions and help identify shifts in price behavior beneath the surface.
Features:
• Automatic swing amplitude detection
• Multiple amplitude calculation methods:
• Points
• Percent
• ATR Multiple
• Compares recent swing behavior against historical averages
• Automatic market state classification:
• ▲ Expanding
• ■ Stable
• ▼ Contracting
• Historical state ribbon visualization
• Optional background state highlighting
• State transition markers
• Current-state icon display
• Dynamic text labels
• One-line summary table
Potential use cases:
• Identify increasing market activity
• Detect contracting or slowing environments
• Filter trades based on market conditions
• Monitor transitions between regimes
• Add confluence to existing systems
• Study changing market behavior over time
Interpretation:
▲ Expanding
Recent price swings are becoming larger relative to historical behavior and market activity may be increasing.
■ Stable
Recent swing behavior remains relatively balanced and consistent with historical movement.
▼ Contracting
Recent price swings are becoming smaller relative to historical behavior and market activity may be compressing.
Transition Markers
Highlight when market conditions shift from one state to another.
Historical State Ribbon
🟢 Green → Expanding
🟡 Yellow → Stable
🔴 Red → Contracting
The purpose of this indicator is not to predict future price direction, but to provide insight into how market movement itself is changing and whether current behavior is becoming more active or more compressed.
Settings Guide
Pivot Left Bars
Controls how many bars to the left are used to confirm swing highs and lows.
Pivot Right Bars
Controls how many bars to the right are used to confirm swing highs and lows.
Amplitude Mode
• Points → Uses raw price movement values
• Percent → Measures swings as percentage movement
• ATR Multiple → Measures swings relative to current volatility
ATR Length
ATR period used when ATR Multiple mode is selected.
Recent Swings
Number of recent swings used to represent current market behavior.
Baseline Swings
Historical swing sample used for comparison.
Stable Threshold %
Defines the range where movement is considered stable rather than expanding or contracting.
Show Historical State Ribbon
Displays historical expanding/contracting states.
Show Historical Background
Applies background coloring to historical market states.
Show Transition Markers
Displays markers when state changes occur.
About TrendGenY Indicators
TrendGenY indicators are built from market experience, creative concepts, and a constant pursuit of unique perspectives. Rather than following conventional ideas, the focus is on uncovering alternative insights and viewing market behavior through different angles to reveal information that traditional tools may overlook and help traders build a more meaningful edge in the market.
Amplitude State Simple is a market behavior indicator designed to identify whether price movement is currently expanding, contracting, or remaining relatively stable by analyzing changes in swing amplitude over time.
Rather than measuring trend direction alone, this indicator focuses on the magnitude of movement and compares recent swing behavior against a historical baseline to determine whether market activity is increasing, decreasing, or remaining balanced.
The goal is to provide a simplified view of changing market conditions and help identify shifts in price behavior beneath the surface.
Features:
• Automatic swing amplitude detection
• Multiple amplitude calculation methods:
• Points
• Percent
• ATR Multiple
• Compares recent swing behavior against historical averages
• Automatic market state classification:
• ▲ Expanding
• ■ Stable
• ▼ Contracting
• Historical state ribbon visualization
• Optional background state highlighting
• State transition markers
• Current-state icon display
• Dynamic text labels
• One-line summary table
Potential use cases:
• Identify increasing market activity
• Detect contracting or slowing environments
• Filter trades based on market conditions
• Monitor transitions between regimes
• Add confluence to existing systems
• Study changing market behavior over time
Interpretation:
▲ Expanding
Recent price swings are becoming larger relative to historical behavior and market activity may be increasing.
■ Stable
Recent swing behavior remains relatively balanced and consistent with historical movement.
▼ Contracting
Recent price swings are becoming smaller relative to historical behavior and market activity may be compressing.
Transition Markers
Highlight when market conditions shift from one state to another.
Historical State Ribbon
🟢 Green → Expanding
🟡 Yellow → Stable
🔴 Red → Contracting
The purpose of this indicator is not to predict future price direction, but to provide insight into how market movement itself is changing and whether current behavior is becoming more active or more compressed.
Settings Guide
Pivot Left Bars
Controls how many bars to the left are used to confirm swing highs and lows.
Pivot Right Bars
Controls how many bars to the right are used to confirm swing highs and lows.
Amplitude Mode
• Points → Uses raw price movement values
• Percent → Measures swings as percentage movement
• ATR Multiple → Measures swings relative to current volatility
ATR Length
ATR period used when ATR Multiple mode is selected.
Recent Swings
Number of recent swings used to represent current market behavior.
Baseline Swings
Historical swing sample used for comparison.
Stable Threshold %
Defines the range where movement is considered stable rather than expanding or contracting.
Show Historical State Ribbon
Displays historical expanding/contracting states.
Show Historical Background
Applies background coloring to historical market states.
Show Transition Markers
Displays markers when state changes occur.
About TrendGenY Indicators
TrendGenY indicators are built from market experience, creative concepts, and a constant pursuit of unique perspectives. Rather than following conventional ideas, the focus is on uncovering alternative insights and viewing market behavior through different angles to reveal information that traditional tools may overlook and help traders build a more meaningful edge in the market.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。