HMA 4H and 15M overlay Notes:
HMA Calculation: We calculate three HMAs for the 15-minute timeframe (ma1, ma2, ma3) based on the settings from your original script, but only ma3 is plotted to keep it consistent with your initial setup.
4-hour HMA: An additional HMA is calculated for the 4-hour timeframe (hma4h) using the hma3 period since it was the longest in your original setup, which might be suitable for a 4-hour chart comparison.
Plotting: Both the 15-minute ma3 and 4-hour hma4h HMAs are plotted with distinct colors for easy visual differentiation.
Timeframe Security: request.security() is used to fetch data from different timeframes. Remember, using request.security() with historical data can sometimes lead to misalignments or delayed data, especially during live trading.
This script will overlay the 15-minute HMA (using the ma3 from your settings) with a new 4-hour HMA on any chart timeframe you apply it to. Remember, if you're looking at a chart timeframe that's not 15 minutes or 4 hours, the HMAs might appear less smooth or aligned due to how Pine Script handles different timeframes.
ניתוח מגמה
Range Filtered Trend Signals [AlgoAlpha]Introducing the Range Filtered Trend Signals , a cutting-edge trading indicator designed to detect market trends and ranging conditions with high accuracy. This indicator leverages a combination of Kalman filtering and Supertrend analysis to smooth out price fluctuations while maintaining responsiveness to trend shifts. By incorporating volatility-based range filtering, it ensures traders can differentiate between trending and ranging conditions effectively, reducing false signals and enhancing trade decision-making.
:key: Key Features
:white_check_mark: Kalman Filter Smoothing – Minimizes market noise while preserving trend clarity.
:bar_chart: Supertrend Integration – A dynamic trend-following mechanism for spotting reversals.
:fire: Volatility-Based Range Detection – Detects trending vs. ranging conditions with precision.
:art: Color-Coded Trend Signals – Instantly recognize bullish, bearish, and ranging market states.
:gear: Customizable Inputs – Fine-tune Kalman parameters, Supertrend settings, and color themes to match your strategy.
:bell: Alerts for Trend Shifts – Get real-time notifications when market conditions change!
:tools: How to Use
Add the Indicator – Click the star icon to add it to your TradingView favorites.
Analyze Market Conditions – Observe the color-coded signals and range boundaries to identify trend strength and direction.
Use Alerts for Trade Execution – Set alerts for trend shifts and market conditions to stay ahead without constantly monitoring charts.
:mag: How It Works
The Kalman filter smooths price fluctuations by dynamically adjusting its weighting based on market volatility. It helps remove noise while keeping the signal reactive to trend changes. The Supertrend calculation is then applied to the filtered price data, providing a robust trend-following mechanism. To enhance signal accuracy, a volatility-weighted range filter is incorporated, creating upper and lower boundaries that define trend conditions. When price breaks out of these boundaries, the indicator confirms trend continuation, while signals within the range indicate market consolidation. Traders can leverage this tool to enhance trade timing, filter false breakouts, and identify optimal entry/exit zones.
SIOVERSE EMA 15 with Buy/Sell Signals, Support & ResistanceThis Pine Script indicator is designed for TradingView and combines Exponential Moving Averages (EMAs), support and resistance levels, buy/sell signals, and volume percentage labels filtered by buy/sell conditions. It is a comprehensive tool for traders who want to analyze price trends, identify key levels, and make informed decisions based on volume and EMA crossovers.
Key Features of the Indicator
EMA 15 (Purple Dashed Line):
A 15-period Exponential Moving Average (EMA) is plotted on the chart as a dashed purple line.
This EMA helps traders identify short-term trends and potential entry/exit points.
Hidden EMA 21 and EMA 34:
The 21-period and 34-period EMAs are calculated but not displayed on the chart.
These EMAs are used to generate buy and sell signals based on crossovers.
Buy/Sell Signals:
Buy Signal: Occurs when the EMA 21 crosses above the EMA 34. A green "BUY" label is displayed below the candle.
Sell Signal: Occurs when the EMA 21 crosses below the EMA 34. A red "SELL" label is displayed above the candle.
These signals help traders identify potential trend reversals or continuations.
Support and Resistance Levels:
Support: The lowest price level over the last lookback_period candles, plotted as a green dashed horizontal line.
Resistance: The highest price level over the last lookback_period candles, plotted as a red dashed horizontal line.
These levels help traders identify key price zones for potential breakouts or reversals.
Volume Percentage Labels (Filtered by Buy/Sell Signals):
The volume percentage is calculated relative to the average volume over the last volume_lookback candles.
Buy Volume Label: When a buy signal occurs, a green label is displayed above the candle with the text "Buy Vol: X.XX%", where X.XX is the volume percentage.
Sell Volume Label: When a sell signal occurs, a red label is displayed below the candle with the text "Sell Vol: X.XX%", where X.XX is the volume percentage.
These labels help traders assess the strength of the buy/sell signals based on volume.
Alerts:
Alerts are triggered when buy or sell signals occur, notifying traders of potential trading opportunities.
Relative Performance SuiteOverview
The Relative Performance Suite (RPS) is a versatile and comprehensive indicator designed to evaluate an asset's performance relative to a benchmark. By offering multiple methods to measure performance, including Relative Performance, Alpha, and Price Ratio, this tool helps traders and investors assess asset strength, resilience, and overall behavior in different market conditions.
Key Features:
✅ Multiple Performance Measures:
Choose from various relative performance calculations, including:
Relative Performance:
Measures how much an asset has outperformed or underperformed its benchmark over a given period.
Relative Performance (Proportional):
A proportional version of relative performance,
factoring in scaling effects.
Relative Performance (MA Based):
Uses moving averages to smooth performance fluctuations.
Alpha:
A measure of an asset’s performance relative to what would be expected based on its beta and the benchmark’s return. It represents the excess return above the risk-free rate after adjusting for market risk.
Price Ratio:
Compares asset prices directly to determine relative value over time.
✅ Customizable Moving Averages:
Apply different moving average types (SMA, EMA, SMMA, WMA, VWMA) to smooth price inputs and refine calculations.
✅ Beta Calculation:
Includes a Beta measure used in Alpha calculation, which users can toggle the visibility of helping users understand an asset's sensitivity to market movements.
✅ Risk-Free Rate Adjustment:
Incorporate risk-free rates (e.g., US Treasury yields, Fed Funds Rate) for a more accurate calculation of Alpha.
✅ Logarithmic Returns Option:
Users can switch between standard returns and log returns for more refined performance analysis.
✅ Dynamic Color Coding:
Identify outperformance or underperformance with intuitive color coding.
Option to color bars based on relative strength, making chart analysis easier.
✅ Customizable Tables for Data Display:
Overview table summarizing key metrics.
Explanation table offering insights into how values are derived.
How to Use:
Select a Benchmark: Choose a comparison symbol (e.g., TOTAL or SPX ).
Pick a Performance Metric: Use different modes to analyze relative performance.
Customize Calculation Methods: Adjust moving averages, timeframes, and log returns based on preference.
Interpret the Colors & Tables: Utilize the dynamic coloring and tables to quickly assess market conditions.
Ideal For:
Traders looking to compare individual asset performance against an index or benchmark.
Investors analyzing Alpha & Beta to understand risk-adjusted returns.
Market analysts who want a visually intuitive and data-rich performance tracking tool.
This indicator provides a powerful and flexible way to track relative asset strength, helping users make more informed trading decisions.
High-Impact News Events with ALERTHigh-Impact News Events with ALERT
This indicator is builds upon the original by adding alert capabilities, allowing traders to receive notifications before and after economic events to manage risk effectively.
This indicator is updated version of the Live Economic Calendar by @toodegrees ( ) which allows user to set alert for the news events.
Key Features
Customizable Alert Selection: Users can choose which impact levels to restrict (High, Medium, Low).
User-Defined Restriction Timing: Set alerts to X minutes before or after the event.
Real-Time Economic Event Detection: Fetches live news data from Forex Factory.
Multi-Event Support: Detects and processes multiple news events dynamically.
Automatic Trading Restriction: user can use this script to stop trades in news events.
Visual Markers:
Vertical dashed lines indicate the start and end of restriction periods.
Background color changes during restricted trading times.
Alerts notify traders during the news events.
How It Works
The user selects which news impact levels should restrict trading.
The script retrieves real-time economic event data from Forex Factory.
Trading can be restricted for X minutes before and after each event.
The script highlights restricted periods with a background color.
Alerts notify traders all time during the news events is active as per the defined time to prevent unexpected volatility exposure.
Customization Options
Choose which news impact levels (High, Medium, Low) should trigger trading restrictions.
Define time limits before and after each news event for restriction.
Enable or disable alerts for restricted trading periods.
How to Use
Apply the indicator to any TradingView chart.
Configure the news event impact levels you want to restrict.
Set the pre- and post-event restriction durations as needed.
The indicator will automatically apply restrictions, plot visual markers, and trigger alerts accordingly.
Limitations
This script relies on Forex Factory data and may have occasional update delays.
TradingView does not support external API connections, so data is updated through internal methods.
The indicator does not execute trades automatically; it only provides visual alerts and restriction signals.
Reference & Credit
This script is based on the Live Economic Calendar by @toodegrees ( ), adding enhanced pre- and post-event alerting capabilities to help traders prepare for market-moving news.
Disclaimer
This script is for informational purposes only and does not constitute financial advice. Users should verify economic data independently and exercise caution when trading around news events. Past performance is not indicative of future results.
Open Interest (Multiple Exchanges for Crypto)On some cryptocurrencies and exchanges the OI data is nonexistent or deplorable. With this indicator you can see OI data from multiple exchanges (or just the best one) from USD,USDT, or USD+USDT pairs whether you are using a perpetuals chart or not.
Hope you all like it!
New Daily Low with Offset Alert FeatureThis indicator plots the current day’s low as a horizontal line on your chart and provides an optional offset line above it. It’s designed for traders who want to monitor when price is near or breaking below the daily low. You can set alerts based on the built-in alert conditions to be notified whenever the market approaches or crosses below these key levels.
How to Use With Alerts:
1. Add the indicator to your chart and choose a timeframe (e.g., 15 minutes).
2. In the script inputs, enable or adjust the daily low line and any offset percentage if desired.
3. Open the “Alerts” menu in TradingView and select the corresponding alert condition:
• Cross Below Daily Low to detect when price dips below the day’s low.
• Cross Below Daily Low + Offset if you prefer a small cushion above the actual low.
4. Configure the alert’s frequency and notifications to stay updated on potential breakdowns.
This setup helps you catch new lows or near-breakdowns quickly, making it useful for both intraday traders and swing traders watching key support levels.
MTF Support & Resistance📌 Multi-Timeframe Support & Resistance (MTF S&R) Indicator
🔎 Overview:
The MTF Support & Resistance Indicator is a powerful tool designed to help traders identify critical price levels where the market is likely to react. This indicator automatically detects support and resistance zones based on a user-defined lookback period and extends these levels dynamically on the chart. Additionally, it provides multi-timeframe (MTF) support and resistance zones, allowing traders to view higher timeframe key levels alongside their current timeframe.
Support and resistance levels are crucial for traders as they help in determining potential reversal points, breakout zones, and trend continuation signals. By incorporating multi-timeframe analysis, this indicator enhances decision-making by providing a broader perspective of price action.
✨ Key Features & Benefits:
✅ Automatic Support & Resistance Detection – No need to manually plot levels; the indicator calculates them dynamically based on historical price action.
✅ Multi-Timeframe (MTF) Levels – Enables traders to see higher timeframe S&R levels on their current chart for better trend confirmation.
✅ Customizable Lookback Period – Adjust sensitivity by modifying the number of historical bars considered when calculating support and resistance.
✅ Color-Coded Visualization –
Green Line → Support on the current timeframe
Red Line → Resistance on the current timeframe
Dashed Blue Line → Higher timeframe support
Dashed Orange Line → Higher timeframe resistance
✅ Dynamic Extension of Levels – Levels extend left and right for better visibility across multiple bars.
✅ Real-Time Updates – Automatically refreshes as new price data comes in.
✅ Non-Repainting – Ensures reliable support and resistance levels that do not change after the bar closes.
📈 How to Use the Indicator:
Identify Key Price Levels:
The green line represents support, where price may bounce.
The red line represents resistance, where price may reject.
The blue dashed line represents support on a higher timeframe, making it a stronger level.
The orange dashed line represents higher timeframe resistance, helping identify major breakout zones.
Trend Trading:
Look for price action around these levels to confirm breakouts or reversals.
Combine with trend indicators (like moving averages) to validate trade entries.
Range Trading:
If the price is bouncing between support and resistance, consider range trading strategies (buying at support, selling at resistance).
Breakout Trading:
If the price breaks above resistance, it could indicate a bullish trend continuation.
If the price breaks below support, it could signal a bearish trend continuation.
⚙️ Indicator Settings:
Lookback Period: Determines the number of historical bars used to calculate support and resistance.
Show Higher Timeframe Levels (MTF): Enable/disable MTF support and resistance levels.
Extend Bars: Extends the drawn lines for better visualization.
Support/Resistance Colors: Allows users to customize the appearance of the lines.
⚠️ Important Notes:
This indicator does NOT generate buy/sell signals—it serves as a technical tool to improve trading analysis.
Best Used With Other Indicators: Consider combining it with volume, moving averages, RSI, or price action strategies for more reliable trade setups.
Works on Any Market & Timeframe: Forex, stocks, commodities, indices, and cryptocurrencies.
Use Higher Timeframe Levels for Stronger Confirmations: If a higher timeframe support/resistance level aligns with a lower timeframe level, it may indicate a stronger price reaction.
🎯 Who Should Use This Indicator?
📌 Scalpers & Day Traders – Identify short-term support and resistance levels for quick trades.
📌 Swing Traders – Utilize higher timeframe levels for position entries and exits.
📌 Trend Traders – Confirm breakout zones and key price levels for trend-following strategies.
📌 Reversal Traders – Spot potential reversal zones at significant S&R levels.
Anchored VWAP with Buy/Sell SignalsAnchored VWAP Calculation:
The script calculates the AVWAP starting from a user-defined anchor point (anchor_date).
The AVWAP is calculated using the formula:
AVWAP
=
∑
(
Volume
×
Average Price
)
∑
Volume
AVWAP=
∑Volume
∑(Volume×Average Price)
where the average price is
(
h
i
g
h
+
l
o
w
+
c
l
o
s
e
)
/
3
(high+low+close)/3.
Buy Signal:
A buy signal is generated when the price closes above the AVWAP (ta.crossover(close, avwap)).
Sell Signal:
A sell signal is generated when the price closes below the AVWAP (ta.crossunder(close, avwap)).
Plotting:
The AVWAP is plotted on the chart.
Buy and sell signals are displayed as labels on the chart.
Background Highlighting:
The background is highlighted in green for buy signals and red for sell signals (optional).
highs&lowsone of my first strategy: highs&lows
This strategy takes the highest high and the lowest low of a specified timeframe and specified bar count.
It will then takes the average between these two extremes to create a center line.
This creates a range of high middle and low.
Then the strategy takes the current market movement
which is the direct average(no specified timeframe and specified bar count) of the current high and low.
Using this "current market movement" within the range of high middle and low it determins when to buy and then sell the asset.
*********note***************
-this strategy is (bullish)
-works good with most futures assets that have volatility/ decent movement
(might add more details if I forget any)
(work in progress)
Support and Resistance with Buy/Sell SignalsSwing Highs and Lows:
The script identifies swing highs and lows using the ta.highest and ta.lowest functions over a user-defined swing_length period.
Swing highs are treated as resistance levels.
Swing lows are treated as support levels.
Buy Signal:
A buy signal is generated when the price closes above the resistance level (ta.crossover(close, swing_high)).
Sell Signal:
A sell signal is generated when the price closes below the support level (ta.crossunder(close, swing_low)).
Plotting:
Support and resistance levels are plotted on the chart.
Buy and sell signals are displayed as labels on the chart.
Background Highlighting:
The background is highlighted in green for buy signals and red for sell signals (optional).
Tri-Fold BB(Trend-Strength)*indicator isn't preset to look as displayed, do so accordingly*
"Tri-Fold BB" is an indicator that utilizes three Bollinger Bands, each of different length as a way to represent trend strength. This allows one to see the trend strength relative to multiple timeframes: short, mid, and long term trend strength. This is helpful because it provides the user with a holistic view of the asset.
How it Works
The indicator is preset to utilizing three different Bollinger Bands with length: 20, 50, and 100. This indicator simply plots the price of an asset relative to its specified Bollinger Band. For an example, if the price of the asset were to surpass its 20BB standard deviations, it would display so accordingly, though from the perspective of lets say... the 100, it may have looked like it barely moved up a standard deviation relative to 100BB because the standard deviations of a 100BB are more spread out.
Its important to view the trend strength from multiple lengths because it allows one to gauge whether the short term trend strength is likely to hold or not. A better way to speculate on asset behavior.
Another way to view this indicator is similar to that of the BB% indicator, except this indicator allows us to view price relative to standard deviations, across multiple timeframes. More holistic, more utility provided.
Basic Understanding:
Each line = Standard Deviation (3 upper, 3 lower)
Mid-Line = Basis relative to BB(20sma, 50sma, 100sma)
If price goes under Basis, that means it crossed below their specified sma(significant bull or bear signal)
I've also added HMA's relative to each BB incase one were to decide in creating some sort of trading strategy with it. I personally don't use them but I understand that it could be helpful to some so I left it in there. If you don't like them then simply deselect them and then save your desired setup as default.
In regard to regular indications of bullish or bearishness, i'd like to add that I use this indicator for the sole purpose of providing an idea of trend strength. I personally am unsure to state that cross overs directly indicate that there is a bull or bear move because I've seen instances where the price of an asset went in a direction contrary to what it 'should' have if we were to use that cross over strategy. Though of course, feel free to use this indicator as desired.
Son Model ICT [TradingFinder] HTF DOL H1 + Sweep M15 + FVG M1🔵 Introduction
The ICT Son Model setup is a precise trading strategy based on market structure and liquidity, implemented across multiple timeframes. This setup first identifies a liquidity level in the 1-hour (1H) timeframe and then confirms a Market Structure Shift (MSS) in the 5-minute (5M) timeframe to validate the trend. After confirmation, the price forms a new swing in the 5-minute timeframe, absorbing liquidity.
Once this level is broken, traders typically drop to the 30-second (30s) timeframe and enter trades based on a Fair Value Gap (FVG). However, since access to the 30-second timeframe is not available to most traders, we take the entry signal directly from the 5-minute timeframe, using the same liquidity zones and confirmed breakouts to execute trades. This approach simplifies execution and makes the strategy accessible to all traders.
This model operates in two setups :
Bullish ICT Son Model and Bearish ICT Son Model. In the bullish setup, liquidity is first accumulated at the lows of the 1-hour timeframe, and after confirming a market structure shift, a long position is initiated. Conversely, in the bearish setup, liquidity is first drawn from higher levels, and upon confirmation of a bearish trend, a short position is executed.
Bullish Setup :
Bearish Setup :
🔵 How to Use
The ICT Son Model setup is designed around liquidity analysis and market structure shifts and can be applied in both bullish and bearish market conditions. The strategy first identifies a liquidity level in the 1-hour (1H) timeframe and then confirms a Market Structure Shift (MSS) in the 5-minute (5M) timeframe.
After this shift, the price forms a new swing, absorbing liquidity. When this level is broken in the 5-minute timeframe, the trader enters based on a Fair Value Gap (FVG). While the ideal entry is in the 30-second (30s) timeframe, due to accessibility constraints, we take entry signals directly from the 5-minute timeframe.
🟣 Bullish Setup
In the Bullish ICT Son Model, the 1-hour timeframe first identifies liquidity at the market lows, where price sweeps this level to absorb liquidity. Then, in the 5-minute timeframe, an MSS confirms the bullish shift.
After confirmation, the price forms a new swing, absorbing liquidity at a higher level. The price then retraces into a Fair Value Gap (FVG) created in the 5-minute timeframe, where the trader enters a long position, placing the stop-loss below the FVG.
🟣 Bearish Setup
In the Bearish ICT Son Model, liquidity at higher market levels is identified in the 1-hour timeframe, where price sweeps these levels to absorb liquidity. Then, in the 5-minute timeframe, an MSS confirms the bearish trend.
After confirmation, the price forms a new swing, absorbing liquidity at a lower level. The price then retraces into a Fair Value Gap (FVG) created in the 5-minute timeframe, where the trader enters a short position, placing the stop-loss above the FVG.
🔵 Settings
Swing period : You can set the swing detection period.
Max Swing Back Method : It is in two modes "All" and "Custom". If it is in "All" mode, it will check all swings, and if it is in "Custom" mode, it will check the swings to the extent you determine.
Max Swing Back : You can set the number of swings that will go back for checking.
FVG Length : Default is 120 Bar.
MSS Length : Default is 80 Bar.
FVG Filter : This refines the number of identified FVG areas based on a specified algorithm to focus on higher quality signals and reduce noise.
Types of FVG filters :
Very Aggressive Filter: Adds a condition where, for an upward FVG, the last candle's highest price must exceed the middle candle's highest price, and for a downward FVG, the last candle's lowest price must be lower than the middle candle's lowest price. This minimally filters out FVGs.
Aggressive Filter: Builds on the Very Aggressive mode by ensuring the middle candle is not too small, filtering out more FVGs.
Defensive Filter: Adds criteria regarding the size and structure of the middle candle, requiring it to have a substantial body and specific polarity conditions, filtering out a significant number of FVGs.
Very Defensive Filter: Further refines filtering by ensuring the first and third candles are not small-bodied doji candles, retaining only the highest quality signals.
🔵 Conclusion
The ICT Son Model setup is a structured and precise method for trade execution based on liquidity analysis and market structure shifts. This strategy first identifies a liquidity level in the 1-hour timeframe and then confirms a trend shift using the 5-minute timeframe.
Trade entries are executed based on Fair Value Gaps (FVGs), which highlight optimal entry points. By applying this model, traders can leverage existing market liquidity to enter high-probability trades. The bullish setup activates when liquidity is swept from market lows and a market structure shift confirms an upward trend, whereas the bearish setup is used when liquidity is drawn from market highs, confirming a downtrend.
This approach enables traders to identify high-probability trade setups with greater precision compared to many other strategies. Additionally, since access to the 30-second timeframe is limited, the strategy remains fully functional in the 5-minute timeframe, making it more practical and accessible for a wider range of traders.
Cluster Reversal Zones📌 Cluster Reversal Zones – Smart Market Turning Point Detector
📌 Category : Public (Restricted/Closed-Source) Indicator
📌 Designed for : Traders looking for high-accuracy reversal zones based on price clustering & liquidity shifts.
🔍 Overview
The Cluster Reversal Zones Indicator is an advanced market reversal detection tool that helps traders identify key turning points using a combination of price clustering, order flow analysis, and liquidity tracking. Instead of relying on static support and resistance levels, this tool dynamically adjusts to live market conditions, ensuring traders get the most accurate reversal signals possible.
📊 Core Features:
✅ Real-Time Reversal Zone Mapping – Detects high-probability market turning points using price clustering & order flow imbalance.
✅ Liquidity-Based Support/Resistance Detection – Identifies strong rejection zones based on real-time liquidity shifts.
✅ Order Flow Sensitivity for Smart Filtering – Filters out weak reversals by detecting real market participation behind price movements.
✅ Momentum Divergence for Confirmation – Aligns reversal zones with momentum divergences to increase accuracy.
✅ Adaptive Risk Management System – Adjusts risk parameters dynamically based on volatility and trend state.
🔒 Justification for Mashup
The Cluster Reversal Zones Indicator contains custom-built methodologies that extend beyond traditional support/resistance indicators:
✔ Smart Price Clustering Algorithm: Instead of plotting fixed support/resistance lines, this system analyzes historical price clustering to detect active reversal areas.
✔ Order Flow Delta & Liquidity Shift Sensitivity: The tool tracks real-time order flow data, identifying price zones with the highest accumulation or distribution levels.
✔ Momentum-Based Reversal Validation: Unlike traditional indicators, this tool requires a momentum shift confirmation before validating a potential reversal.
✔ Adaptive Reversal Filtering Mechanism: Uses a combination of historical confluence detection + live market validation to improve accuracy.
🛠️ How to Use:
• Works well for reversal traders, scalpers, and swing traders seeking precise turning points.
• Best combined with VWAP, Market Profile, and Delta Volume indicators for confirmation.
• Suitable for Forex, Indices, Commodities, Crypto, and Stock markets.
🚨 Important Note:
For educational & analytical purposes only.
Iron Bot Statistical Trend Filter📌 Iron Bot Statistical Trend Filter
📌 Overview
Iron Bot Statistical Trend Filter is an advanced trend filtering strategy that combines statistical methods with technical analysis.
By leveraging Z-score and Fibonacci levels, this strategy quantitatively analyzes market trends to provide high-precision entry signals.
Additionally, it includes an optional EMA filter to enhance trend reliability.
Risk management is reinforced with Stop Loss (SL) and four Take Profit (TP) levels, ensuring a balanced approach to risk and reward.
📌 Key Features
🔹 1. Statistical Trend Filtering with Z-Score
This strategy calculates the Z-score to measure how much the price deviates from its historical mean.
Positive Z-score: Indicates a statistically high price, suggesting a strong uptrend.
Negative Z-score: Indicates a statistically low price, signaling a potential downtrend.
Z-score near zero: Suggests a ranging market with no strong trend.
By using the Z-score as a filter, market noise is reduced, leading to more reliable entry signals.
🔹 2. Fibonacci Levels for Trend Reversal Detection
The strategy integrates Fibonacci retracement levels to identify potential reversal points in the market.
High Trend Level (Fibo 23.6%): When the price surpasses this level, an uptrend is likely.
Low Trend Level (Fibo 78.6%): When the price falls below this level, a downtrend is expected.
Trend Line (Fibo 50%): Acts as a midpoint, helping to assess market balance.
This allows traders to visually confirm trend strength and turning points, improving entry accuracy.
🔹 3. EMA Filter for Trend Confirmation (Optional)
The strategy includes an optional 200 EMA (Exponential Moving Average) filter for trend validation.
Price above 200 EMA: Indicates a bullish trend (long entries preferred).
Price below 200 EMA: Indicates a bearish trend (short entries preferred).
Enabling this filter reduces false signals and improves trend-following accuracy.
🔹 4. Multi-Level Take Profit (TP) and Stop Loss (SL) Management
To ensure effective risk management, the strategy includes four Take Profit levels and a Stop Loss:
Stop Loss (SL): Automatically closes trades when the price moves against the position by a certain percentage.
TP1 (+0.75%): First profit-taking level.
TP2 (+1.1%): A higher probability profit target.
TP3 (+1.5%): Aiming for a stronger trend move.
TP4 (+2.0%): Maximum profit target.
This system secures profits at different stages and optimizes risk-reward balance.
🔹 5. Automated Long & Short Trading Logic
The strategy is built using Pine Script®’s strategy.entry() and strategy.exit(), allowing fully automated trading.
Long Entry:
Price is above the trend line & high trend level.
Z-score is positive (indicating an uptrend).
(Optional) Price is also above the EMA for stronger confirmation.
Short Entry:
Price is below the trend line & low trend level.
Z-score is negative (indicating a downtrend).
(Optional) Price is also below the EMA for stronger confirmation.
This logic helps filter out unnecessary trades and focus only on high-probability entries.
📌 Trading Parameters
This strategy is designed for flexible capital management and risk control.
💰 Account Size: $5000
📉 Commissions and Slippage: Assumes 94 pips commission per trade and 1 pip slippage.
⚖️ Risk per Trade: Adjustable, with a default setting of 1% of equity.
These parameters help preserve capital while optimizing the risk-reward balance.
📌 Visual Aids for Clarity
To enhance usability, the strategy includes clear visual elements for easy market analysis.
✅ Trend Line (Blue): Indicates market midpoint and helps with entry decisions.
✅ Fibonacci Levels (Yellow): Highlights high and low trend levels.
✅ EMA Line (Green, Optional): Confirms long-term trend direction.
✅ Entry Signals (Green for Long, Red for Short): Clearly marked buy and sell signals.
These features allow traders to quickly interpret market conditions, even without advanced technical analysis skills.
📌 Originality & Enhancements
This strategy is developed based on the IronXtreme and BigBeluga indicators,
combining a unique Z-score statistical method with Fibonacci trend analysis.
Compared to conventional trend-following strategies, it leverages statistical techniques
to provide higher-precision entry signals, reducing false trades and improving overall reliability.
📌 Summary
Iron Bot Statistical Trend Filter is a statistically-driven trend strategy that utilizes Z-score and Fibonacci levels.
High-precision trend analysis
Enhanced accuracy with an optional EMA filter
Optimized risk management with multiple TP & SL levels
Visually intuitive chart design
Fully customizable parameters & leverage support
This strategy reduces false signals and helps traders ride the trend with confidence.
Try it out and take your trading to the next level! 🚀
MTF Ichimoku Conversion Line SMA with H/L mirrored levelsWelcome to MTF Ichimoku Conversion Line with SMA Highs/Lows Extended Lines!
1. Overview
It is designed to provide a multi-timeframe view of market trends and potential support/resistance levels by obtaining a Simple Moving Average (SMA) of the Conversion Line of Ichimoku Equibilium (Ichimoku Kinko-Hyo), which acts as a substantial trend line on the candlestick chart. The SMA of the conversion line smooths out price fluctuations and indicates the overall trend direction—if the candles are above it, the trend can be read as an uptrend, while below it, the trend can be read as a downtrend.
2. Calculation
The indicator first calculates the Conversion Line (see the description of Ichimoku theory anywhere, e.g., Wikipedia), as the average of the highest high and lowest low over a user-defined period (Conversion Line Length, default is 9, also recommended is 9).
It then retrieves this Conversion Line from a higher timeframe (MTF Timeframe) to add a broader perspective. Using a specified period (SMA Length)., an SMA is computed on this multi-timeframe conversion line. This SMA serves as a trend line that visually represents the prevailing price trend, making it easier to assess market direction.
3. Pivot Highs/low detection and drawing their extensions
In addition, the indicator identifies pivot highs and lows from the SMA data using a defined pivot length. When these pivots occur, horizontal lines are drawn and extended across the chart. These extended lines (drawn in a yellowish color by default) include a full extension, a half extension, and a middle extension line representing the midpoint between the high and low pivot.
4. Mirror lines
The indicator also offers optional mirror line features. When the Mirror Upside option is enabled, five additional lines are drawn above the highest extended yellow line at equal intervals. Similarly, when the Mirror Downside option is enabled, five lines are drawn below the lowest extended yellow line. These light gray mirror lines serve as extra reference levels, which can help identify potential support or resistance zones.
5. Parameters
User parameters include:
- Conversion Line Length: The period used to calculate the conversion line.
- MTF Timeframe: The higher timeframe from which the conversion line is obtained.
- SMA Length: The period over which the SMA is calculated on the conversion line.
- SMA Mode: A toggle to display either the SMA or the raw conversion line (SMA recommended).
- SMA Line Width: The thickness of the SMA line.
- Pivot Length for SMA Highs/Lows: The period used to detect pivot highs and lows in the SMA.
- Horizontal Extension: Number of bars by which the pivot and extended lines are drawn across the chart
- Colors for High and Low Pivot Lines and Extended Lines: Customizable colors are used to draw the lines.
Mirror Upside and Mirror Downside: These options enable drawing additional mirror lines above and below the extended lines.
- Hide Old Lines: An option to hide previous pivot lines once new ones are drawn for a cleaner chart. Turned on by default.
6. Conclusion
Overall, the Conversion Line SMA in this indicator smooths out the conversion line data and effectively functions as a trend line for the candlestick chart, helping traders visually interpret the underlying market trend. The extended and mirror lines provide further context for potential price reversal or continuation areas, making this a powerful tool for multi-timeframe technical analysis.
Market Phase MAMarket Phase MA is an advanced trend-following indicator designed to provide traders with a dynamically colored moving average that adapts to market conditions. It uses a powerful combination of Average True Range (ATR) and Average Directional Index (ADX) to classify market trends in real-time. The indicator integrates a fully customizable moving average (SMA or EMA) to highlight trend phases clearly and effectively.
Key Features & Advantages:
✔ Adaptive Trend Classification: Detects uptrends, downtrends, and sideways markets using a refined mix of ATR and ADX for more precise trend identification.
✔ Color-Coded Moving Average: The moving average dynamically changes color based on trend classification, providing a clean visual representation of market sentiment.
✔ Advanced ATR & ADX Filtering:
- ATR measures market volatility and identifies ranging periods.
- ADX confirms trend strength, reducing false signals.
- A weighted approach balances ATR and ADX, ensuring reliability.
✔ Fully Customizable Moving Average: Traders can select between SMA and EMA while adjusting the moving average length directly from the settings panel.
✔ Smooth & Responsive Adjustments: The smoothing factor can be fine-tuned to control signal sensitivity and noise reduction, making it suitable for scalping, swing trading, and long-term trend monitoring.
What Makes It Unique:
- Unlike traditional trend indicators, Market Phase MA provides **direct visual feedback** on a moving average rather than using a separate oscillator.
- It **adapts dynamically** to market conditions instead of relying on fixed thresholds.
- The combination of **volatility and trend strength analysis** enhances precision in identifying valid trends.
- Users can optimize **reaction speed vs. reliability** with adjustable parameters for better decision-making.
How to Use It:
- Identify Market Phases: The moving average color shifts based on trend type—**teal** for uptrends, **red** for downtrends, and **gray** for sideways markets.
- Confirm Trend Strength: Persistent color shifts indicate strong trends, while frequent changes may suggest market indecision.
- Use as a Trade Confirmation Tool: Complement it with **support & resistance zones, price action analysis, and volume indicators** for stronger confirmation signals.
Market Phase MA is designed for traders seeking a clear, efficient, and highly adaptable moving average trend detection system. Whether you are a day trader, swing trader, or long-term investor, this indicator will help you identify and follow trends with confidence.
Smoothed Low-Pass Butterworth Filtered Median [AlphaAlgos]Smoothed Low-Pass Butterworth Filtered Median
This indicator is designed to smooth price action and filter out noise while maintaining the dominant trend. By combining a Butterworth low-pass filter with a median-based smoothing approach , it effectively reduces short-term fluctuations, allowing traders to focus on the true market direction.
How It Works
Median Smoothing: The indicator calculates the 50th percentile (median) of closing prices over a customizable period , making it more robust against outliers compared to traditional moving averages.
Butterworth Filtering: A low-pass filter is applied using an approximation of the Butterworth formula , controlled by the Cutoff Frequency , helping to eliminate high-frequency noise while preserving trends.
EMA Refinement: A 7-period EMA is applied to further smooth the signal, providing a more reliable trend representation.
Features
Trend Smoothing: Reduces market noise and highlights the dominant trend.
Dynamic Color Signals: The EMA line changes color to indicate trend strength and direction.
Configurable Parameters: Customize the median length, cutoff frequency, and EMA length to fit your strategy.
Versatile Use Case: Suitable for both trend-following and mean-reversion strategies.
How to Use
Bullish Signal: When the EMA is below the price and rising , indicating upward momentum.
Bearish Signal: When the EMA is above the price and falling , signaling a potential downtrend.
Reversal Zones: Monitor for trend shifts when the color of the EMA changes.
This indicator provides a clear, noise-free view of market trends , making it ideal for traders seeking improved trend identification and entry signals .
Blockchain Fundamentals: Liquidity & BTC YoYLiquidity & BTC YoY Indicator
Overview:
This indicator calculates the Year-over-Year (YoY) percentage change for two critical metrics: a custom Liquidity Index and Bitcoin's price. The Liquidity Index is derived from a blend of economic and forex data representing the M2 money supply, while the BTC price is obtained from a reliable market source. A dedicated limit(length) function is implemented to handle limited historical data, ensuring that the YoY calculations are available immediately—even when the chart's history is short.
Features Breakdown:
1. Limited Historical Data Workaround
- Functionality: limit(length) The function dynamically adjusts the lookback period when there isn’t enough historical data. This prevents delays in displaying YoY metrics at the beginning of the chart.
2. Liquidity Calculation
- Data Sources: Combines multiple data streams:
USM2, ECONOMICS:CNM2, USDCNY, ECONOMICS:JPM2, USDJPY, ECONOMICS:EUM2, USDEUR
- Formula:
Liquidity Index = USM2 + (CNM2 / USDCNY) + (JPM2 / USDJPY) + (EUM2 / USDEUR)
[b3. Bitcoin Price Calculation
- Data Source: Retrieves Bitcoin's price from BITSTAMP:BTCUSD on the user-selected timeframe for its historical length.
4. Year-over-Year (YoY) Percent Change Calculation
- Methodology:
- The indicator uses a custom function, to autodetect the proper number of bars, based on the selected timeframe.
- It then compares the current value to that from one year ago for both the Liquidity Index and BTC price, calculating the YoY percentage change.
5. Visual Presentation
- Plotting:
- The YoY percentage changes for Liquidity (plotted in blue) and BTC price (plotted in orange) are clearly displayed.
- A horizontal zero line is added for visual alignment, making it easier to compare the two copies of the metric. You add one copy and only display the BTC YoY. Then you add another copy and only display the M2 YoY.
-The zero lines are then used to align the scripts to each other by interposing them. You scale each chart the way you like, then move each copy individually to align both zero lines on top of each other.
This indicator is ideal for analysts and investors looking to monitor macroeconomic liquidity trends alongside Bitcoin's performance, providing immediate insights.
Multi-Moving Average Buy/Sell IndicatorThis Multi-Moving Average Buy/Sell Indicator is a powerful and customizable tool designed to help traders identify potential buy and sell signals based on the interaction between price and multiple moving averages. Whether you're a day trader, swing trader, or long-term investor, this indicator provides clear visual cues and alerts to help you make informed trading decisions.
Key Features
1. Multiple Moving Averages
The indicator calculates four key moving averages:
9-period MA
20-period MA
50-period MA
180-period MA
You can choose the type of moving average:
SMA (Simple Moving Average)
EMA (Exponential Moving Average)
WMA (Weighted Moving Average)
2. Custom Timeframe
Select a custom timeframe from a user-friendly dropdown menu:
1 Minute
5 Minutes
15 Minutes
30 Minutes
1 Hour
4 Hours
Daily
Weekly
The indicator dynamically adjusts to the selected timeframe, making it suitable for all trading styles.
3. Buy/Sell Signals
Buy Signal: Triggered when the price crosses above any of the moving averages.
Sell Signal: Triggered when the price crosses below any of the moving averages.
Signals are displayed as labels on the chart:
Green "BUY" Label: Below the bar when a buy signal is triggered.
Red "SELL" Label: Above the bar when a sell signal is triggered.
4. Visualization
Toggle the visibility of all moving averages using the showAllMAs input.
Moving averages are plotted with distinct colors for easy identification:
9 MA: Blue
20 MA: Orange
50 MA: Purple
180 MA: Teal
5. Alerts
The indicator generates alerts for buy and sell signals, which can be used for notifications or automated trading.
How to Use
Add the Indicator:
Open TradingView and go to the Pine Script Editor.
Copy and paste the script into the editor.
Click Add to Chart.
Configure Inputs:
maType: Choose the type of moving average (SMA, EMA, WMA).
timeframe: Select a custom timeframe (e.g., "1 Minute", "Daily").
showSignals: Toggle to show or hide buy/sell signals.
showAllMAs: Toggle to show or hide all moving averages.
Interpret the Signals:
Look for green "BUY" labels below the bars for potential buy opportunities.
Look for red "SELL" labels above the bars for potential sell opportunities.
Set Alerts:
Use the built-in alert system to get notified when buy or sell signals are triggered.
Example Use Cases
Day Trading
Use a 1-minute or 5-minute timeframe with an EMA for quick signals.
Example Inputs:
maType = "EMA"
timeframe = "5 Minutes"
showAllMAs = true
Swing Trading
Use a daily timeframe with an SMA for longer-term signals.
Example Inputs:
maType = "SMA"
timeframe = "Daily"
showAllMAs = false
Why Use This Indicator?
Versatility: Suitable for all trading styles and timeframes.
Customization: Choose your preferred moving average type and timeframe.
Clear Signals: Easy-to-read buy/sell labels and moving averages.
Alerts: Never miss a trading opportunity with built-in alerts.
Limitations
False Signals:
The indicator may generate false signals in choppy or sideways markets. Always combine it with other tools (e.g., RSI, volume analysis) for better accuracy.
Timeframe Dependency:
The effectiveness of the signals depends on the selected timeframe. Shorter timeframes may produce more signals but with higher noise.
No Backtesting:
The script does not include backtesting functionality. Test the strategy manually on historical data.
Customization Options
Add More Moving Averages: Modify the script to include additional moving averages (e.g., 200 MA).
Change Signal Logic: Adjust the conditions for buy/sell signals (e.g., require confirmation from multiple moving averages).
Add Alerts for Specific MAs: Create separate alerts for signals based on specific moving averages (e.g., only 9 MA or 50 MA).
On-chain Zscore | QuantumResearchQuantumResearch On-chain Zscore Indicator
The On-chain Zscore Indicator by QuantumResearch is a cutting-edge tool designed for traders and analysts who leverage on-chain metrics to assess Bitcoin’s market conditions. This indicator calculates a composite Z-score using three key on-chain metrics: NUPL (Net Unrealized Profit/Loss), SOPR (Spent Output Profit Ratio), and MVRV (Market Value to Realized Value). By normalizing these values through standard deviations, the indicator provides a dynamic, data-driven approach to identifying overbought and oversold conditions, improving market timing and decision-making.
1. Overview
This indicator integrates multiple on-chain metrics to:
Assess Market Cycles – Utilize Z-score normalization to detect potential tops and bottoms.
Smooth Volatility – Apply EMA and standard deviation filtering to refine signals.
Identify Buy & Sell Signals – Use adaptive thresholds to highlight market extremes.
Provide Visual Clarity – Color-coded bar signals and background fills for intuitive analysis.
2. How It Works
A. Z-score Calculation
What is a Z-score? – The Z-score measures how far a data point deviates from its historical mean in terms of standard deviations. This helps in identifying statistical extremes.
Zscore(source,mean,std)=>
zscore = (source-mean)/std
zscore
Standard Deviation Normalization – Each on-chain metric (NUPL, SOPR, MVRV) is individually standardized before being combined into a final score.
B. On-Chain Components
NUPL Z-score – Measures unrealized profits and losses relative to market cycles.
SOPR Z-score – Evaluates profit-taking behavior on spent outputs.
MVRV Z-score – Assesses whether Bitcoin is overvalued or undervalued based on market cap vs. realized cap.
C. Composite On-chain Score
The indicator computes an average Z-score of the three on-chain metrics to create a composite market assessment.
Adaptive thresholds (default: 0.73 for bullish signals, -0.44 for bearish signals) dynamically adjust based on market conditions.
3. Visual Representation
This indicator features color-coded elements and dynamic threshold visualization:
Bar Colors
Green Bars – Bullish conditions when Z-score exceeds the upper threshold.
Red Bars – Bearish conditions when Z-score drops below the lower threshold.
Gray Bars – Neutral market conditions.
Threshold Bands & Background Fill
Upper Band (Overbought) – Default threshold set at 0.73.
Middle Band – Neutral zone at 0.
Lower Band (Oversold) – Default threshold set at -0.44.
4. Customization & Parameters
This indicator is highly configurable, allowing traders to fine-tune settings based on their strategy:
On-Chain Z-score Settings
NUPL Z-score Length – Default: 126 periods
SOPR Z-score Length – Default: 111 periods
MVRV Z-score Length – Default: 111 periods
Signal Thresholds
Upper Threshold (Bullish Zone) – Default: 0.73
Lower Threshold (Bearish Zone) – Default: -0.44
Color & Visual Settings
Choose from eight customizable color modes to suit personal preferences.
5. Trading Applications
The On-chain Zscore Indicator is versatile and can be applied in various market scenarios:
Macro Trend Analysis – Identify long-term market tops and bottoms using normalized on-chain metrics.
Momentum Confirmation – Validate price action trends with SOPR & MVRV behavior.
Market Timing – Use deviation thresholds to enter at historically significant price zones.
Risk Management – Avoid overextended markets by watching for extreme Z-score readings.
6. Final Thoughts
The QuantumResearch On-chain Zscore Indicator provides a unique approach to market evaluation by combining three critical on-chain metrics into a single, normalized score.
By standardizing Bitcoin’s market behavior, this tool helps traders and investors make informed decisions based on historical statistical extremes.
Backtesting and validation are essential before using this indicator in live trading. While it enhances market analysis, it should be used alongside other tools and strategies.
Disclaimer: No indicator can guarantee future performance. Always use appropriate risk management and perform due diligence before trading.
Combo Gama Exposure + EMA + SMA 1.0Gamma Exposure (GEX) for the CBOE Volatility Index ( TVC:VIX ) is an estimate of how much option sellers need to hedge for every 1% change in the underlying asset's price. It's also known as Gamma Levels.
How is GEX calculated?
GEX is calculated based on a 1% move of the underlying security
It's calculated and updated throughout the day
It's based on market positioning and open interest
These regions are important because they show the regions where players can act more aggressively to defend their positions. When inserting the indicator on the chart, a popup will open requesting the GEX levels (Put wall, Vix Call Wall 0DTE, etc.)
In addition, 3 moving averages will be inserted into the chart. A 9-period exponential moving average, a 20-period arithmetic moving average, and a 200-period arithmetic moving average. These moving averages aim to indicate the possible trend of the asset, where pullbacks in these averages can signal a possible entry in favor of the trend.
Adaptive Supply and Demand [EdgeTerminal]Adaptive Supply and Demand is a dynamic supply and demand indicator with a few unique twists. It considers volume pressure, volatility-based adjustments and multi-time frame momentum for confidence scoring (multi-step confirmation) to generate dynamic lines that adjust based on the market and also to generate dynamic support/resistance levels for the supply and demand lines.
The dynamic support and resistance lines shown gives you a better situational awareness of the current state of the market and add more context to why the market is moving into a certain direction.
> Trading Scenarios
When the confidence score is over 80%, strong volume pressure in trend direction (up or down), volatility is low and momentum is aligned across timeframes, there is an indication of a strong upward or downward trend.
When the supply and demand line crossover, the confidence score is over 75% and the volume pressure is shifting, this can be an indicator of trend reversal. Use tight initial stops, scale into position as trend develops, monitor the volume pressure for continuation and wait for confidence confirmation.
When the confiance score is below 60%, the volume pressure is choppy, volatility is high, you want to avoid trading or reduce position size, wait for confidence improvements, use support and resistance for entries/exits and use tighter stops due to market conditions. This is an indication of a ranging market.
Another scenario is when there is a sudden volume pressure increase, and a raising confidence score, the volatility is expanding and the bar momentum is aligning the volatility direction. This can indicate a breakout scenario.
> How it Works
1. Volume Pressure Analysis
Volume Pressure Analysis is a key component that measures the true buying and selling force in the market. Here's a detailed breakdown. The idea is to standardize volume to prevent large spikes from skewing results.
The indicator employs an adaptive volume normalization technique to detect genuine buying and selling pressure.
It takes current volume and divides it by average volume.
If normVol > 1: Current volume is above average
If normVol < 1: Current volume is below average
An example if this would be If current volume is 1500 and average is 1000, normVol = 1.5 (50% above average)
Another component of the volume pressure analysis is the Price Change Calculation sub-module. The purpose of this is to measure price movement relative to recent average.
It works by subtracting the average price from the current price. If the value is positive, price is average and if negative, price is below average.
Finally, the volume pressure is calculated to combine volume and price for true pressure reading.
2. Savitzky-Golay Filtering
SG filtering implements advanced signal smoothing while preserving important trend features. It uses weighted moving average approximation, preserves higher moments of data and reduces noise while maintaining signal integrity.
This results in smoother signal lines, reduced false crossovers and better trend identification. Traditional moving averages tend to lag and smooth out important features. Additionally, simple moving averages can miss critical turning points and regular smoothing can delay signal generation.
SG filtering preserves higher moments such as peaks, valleys and trends, reduces noise while maintaining signal sharpness.
It works by creating a symmetric weighting scheme. This way center points get the highest weights while edge points get the lowest weight.
3. Parkinson's Volatility
Parkinson's Volatility is an advanced volatility measurement formula using high-low range data. It uses high-low range for volatility calculation, incorporates logarithmic returns and annualized the volatility measure.
This results in more accurate volatility measurement, better risk assessment and dynamic signal sensitivity.
4. Multi-timeframe Momentum
This combines signals from each module for each timeframe to calculate momentum across three timeframes. It also applies weighted importance to each timeframe and generates a composite momentum signal.
This results in a more comprehensive trend analysis, reduced timeframe bias and better trend confirmation.
> Indicator Settings
Short-term Period:
Lower values makes it more sensitive, meaning it will generate more signals. Higher values makes it less sensitive, resulting in fewer signals. We recommend a 5 to 15 range for day trading, and 10 to 20 for swing trading
Medium-term Period:
Lower values result in faster trend confirmation and higher values show slower and more reliable confirmation. We recommend a range of 15-25 for day trading and 20-30 for swing trading.
Long-term Period:
Lower values makes it more responsive to trend changes and higher values are better for major trend identification. We recommend a range of 40-60 for day trading and 50-100 for swing trading.
Volume Analysis Window:
Lower values result in more sensitivity to volume changes and higher values result in smoother volume analysis. The optimal range is 15-25 for most trading styles.
Confidence Threshold:
Lower values generate more signals but quality decreases. Higher values generate fewer signals but accuracy increases.The optimal range is 0.65-0.8 for most trading conditions.