MACD Volume Strategy for XAUUSD (15m) [PineIndicators]The MACD Volume Strategy is a momentum-based trading system designed for XAUUSD on the 15-minute timeframe. It integrates two key market indicators: the Moving Average Convergence Divergence (MACD) and a volume-based oscillator to identify strong trend shifts and confirm trade opportunities. This strategy uses dynamic position sizing, incorporates leverage customization, and applies structured entry and exit conditions to improve risk management.
⚙️ Core Strategy Components
1️⃣ Volume-Based Momentum Calculation
The strategy includes a custom volume oscillator to filter trade signals based on market activity. The oscillator is derived from the difference between short-term and long-term volume trends using Exponential Moving Averages (EMAs)
Short EMA (default = 5) represents recent volume activity.
Long EMA (default = 8) captures broader volume trends.
Positive values indicate rising volume, supporting momentum-based trades.
Negative values suggest weak market activity, reducing signal reliability.
By requiring positive oscillator values, the strategy ensures momentum confirmation before entering trades.
2️⃣ MACD Trend Confirmation
The strategy uses the MACD indicator as a trend filter. The MACD is calculated as:
Fast EMA (16-period) detects short-term price trends.
Slow EMA (26-period) smooths out price fluctuations to define the overall trend.
Signal Line (9-period EMA) helps identify crossovers, signaling potential trend shifts.
Histogram (MACD – Signal) visualizes trend strength.
The system generates trade signals based on MACD crossovers around the zero line, confirming bullish or bearish trend shifts.
📌 Trade Logic & Conditions
🔹 Long Entry Conditions
A buy signal is triggered when all the following conditions are met:
✅ MACD crosses above 0, signaling bullish momentum.
✅ Volume oscillator is positive, confirming increased trading activity.
✅ Current volume is at least 50% of the previous candle’s volume, ensuring market participation.
🔻 Short Entry Conditions
A sell signal is generated when:
✅ MACD crosses below 0, indicating bearish momentum.
✅ Volume oscillator is positive, ensuring market activity is sufficient.
✅ Current volume is less than 50% of the previous candle’s volume, showing decreasing participation.
This multi-factor approach filters out weak or false signals, ensuring that trades align with both momentum and volume dynamics.
📏 Position Sizing & Leverage
Dynamic Position Calculation:
Qty = strategy.equity × leverage / close price
Leverage: Customizable (default = 1x), allowing traders to adjust risk exposure.
Adaptive Sizing: The strategy scales position sizes based on account equity and market price.
Slippage & Commission: Built-in slippage (2 points) and commission (0.01%) settings provide realistic backtesting results.
This ensures efficient capital allocation, preventing overexposure in volatile conditions.
🎯 Trade Management & Exits
Take Profit & Stop Loss Mechanism
Each position includes predefined profit and loss targets:
Take Profit: +10% of risk amount.
Stop Loss: Fixed at 10,100 points.
The risk-reward ratio remains balanced, aiming for controlled drawdowns while maximizing trade potential.
Visual Trade Tracking
To improve trade analysis, the strategy includes:
📌 Trade Markers:
"Buy" label when a long position opens.
"Close" label when a position exits.
📌 Trade History Boxes:
Green for profitable trades.
Red for losing trades.
📌 Horizontal Trade Lines:
Shows entry and exit prices.
Helps identify trend movements over multiple trades.
This structured visualization allows traders to analyze past performance directly on the chart.
⚡ How to Use This Strategy
1️⃣ Apply the script to a XAUUSD (Gold) 15m chart in TradingView.
2️⃣ Adjust leverage settings as needed.
3️⃣ Enable backtesting to assess past performance.
4️⃣ Monitor volume and MACD conditions to understand trade triggers.
5️⃣ Use the visual trade markers to review historical performance.
The MACD Volume Strategy is designed for short-term trading, aiming to capture momentum-driven opportunities while filtering out weak signals using volume confirmation.
Recherche dans les scripts pour "entry"
Bot for Spot Market - Custom GridThis script is designed to create a trading bot for the spot market, specifically for buying and selling bitcoins profitably. Recommended for timeframes above two hours. Here are the main functions and features of the script:
Strategy Setup: The bot is set up with a custom grid strategy, defining parameters like pyramiding (allowed number of simultaneous trades), margin requirements, commission, and initial capital.
Order Requirements: It calculates the order price and amount based on the minimum requirements set by the exchange and rounds them appropriately.
Entry Conditions: The bot makes new entries if the closing price falls a certain percentage below the last entry price. It continues to make entries until the closing price rises a certain percentage above the average entry price.
Targets and Plots:
It calculates and plots the target profit level.
It plots the average entry price and the last entry price.
It plots the next entry price based on the defined conditions.
It plots the maximum number of orders allowed based on equity and the number of open orders.
Timerange: The bot can start trading from a specific date and time defined by the user.
Entries: It places orders if the timerange conditions are met. It also places new orders if the closing price is below the last entry price by a defined percentage.
Profit Calculation: The script calculates open profit or loss for the open positions.
Exit Conditions: It closes all positions if the open profit is positive and the closing price is above the target profit level.
Performance Table: The bot maintains and displays statistics like the number of open and closed trades, net profit, and equity in a table format.
The script is customizable, allowing users to adjust parameters like initial capital, commission, order values, and profit targets to fit their specific trading needs and exchange requirements.
Hanzo_Wave_Price %Hanzo_Wave_Price % is a custom indicator for the TradingView platform that combines RSI (Relative Strength Index) and Stochastic RSI while also displaying the percentage price change over a specified period. This indicator helps traders identify overbought and oversold conditions, analyze price waves, and forecast potential market movements.
How It Works
1. RSI and Stochastic RSI Calculation
RSI is calculated based on the selected price source (default: close) with a user-defined Main Line period.
Stochastic RSI is then applied and smoothed using a moving average.
The Main Line represents the smoothed Stochastic RSI, serving as a wave indicator to help identify potential entry and exit points.
2. Overbought and Oversold Zones
The 70 and 30 levels indicate overbought and oversold zones, displayed as dashed lines on the chart.
Additional 20% and 10% levels provide a visual reference for historical price changes, aiding in future predictions.
3. Percentage Price Change Calculation
The indicator calculates the percentage price change over a Barsback period (default: 30 candles).
Users can choose a multiplier (100 or 1000) for better visualization (1000 scales the values by dividing by 10).
The data is displayed as a colored area:
Red (Short) → Negative price change.
Green (Buy) → Positive price change.
Settings & Parameters
Multiplier 💪 – Selects the scaling factor (100 or 1000) for percentage values.
Main Line ✈️ – Stochastic smoothing period (smoothK).
Don't touch ✋ – Reserved value (do not modify).
RSI 🔴 – RSI calculation period.
Stochastic 🔵 – Stochastic RSI calculation period.
Source ⚠️ – Price source for calculations (default: close).
Price changes % 🔼🔽 – Enables percentage price change display.
Barsback ↩️ – Number of candles used to calculate price change.
Visual Representation
Gray Line (Takeprofit Line 🎯) – Smoothed Stochastic RSI.
Red Dashed Line (70) – Overbought zone.
Blue Dashed Line (30) – Oversold zone.
Percentage Price Change Display:
Green Fill → Price increase.
Red Fill → Price decrease.
Advantages
✅ Combined Analysis – Uses RSI and Stochastic RSI for more accurate market condition identification.
✅ Flexibility – Customizable parameters allow adaptation for different markets and strategies.
✅ Visual Clarity – Clearly defined zones and dynamic percentage change display.
✅ Additional Market Insights – The percentage price change helps assess market volatility.
Disadvantages
⚠ Lagging Signals – Smoothing may cause delayed response.
⚠ False Breakouts – The 70/30 levels may not always work effectively for all assets.
⚠ IMPORTANT!
This indicator is for informational and educational purposes only. Past performance does not guarantee future profits! Use it in combination with other technical analysis tools. 🚀
Example 1: Identifying a Long Position
📌 Scenario:
The asset price has dropped significantly (1-hour timeframe), and the Main Line (gray line) crosses below the 30 level. This signals oversold conditions, which may indicate a potential reversal or upward correction.
✅ How to Use:
1️⃣ Identifying the Entry Zone:
If the Main Line is below 30, consider looking for a long entry point.
2️⃣ Confirming the Signal:
Place a vertical line at the moment when the Main Line crosses the 30 level from below.
3️⃣ Confirmation on a Lower Timeframe:
Switch to a 30-minute timeframe and wait for the Main Line to cross above the 70 level.
Enter a long position at this point.
4️⃣ Analyzing Percentage Price Change:
Check the historical indicator behavior:
If a similar past movement resulted in a ~10% price increase (green fill), this may indicate potential upward momentum.
5️⃣ Setting Take-Profit:
Set a take-profit level at 10%, based on previous price movements.
Also, monitor when the Main Line crosses the 70 level, as this may signal a potential profit-taking point.
📊 Conclusion:
This method helps to precisely determine entry points by confirming signals across multiple timeframes and analyzing the historical volatility of the asset. 🚀
Example 2: Analyzing Percentage Price Change
📌 Scenario:
You have set the Barsback parameter to 30, and the indicator shows +3.5%. This means that over the last 30 candles, the price has increased by 3.5%.
However, such small changes might be visually difficult to notice. To improve visibility, you can enable the multiplier (1000), which will scale the displayed percentage change to 35%. This is purely for visual convenience—the actual price movement remains 3.5%.
✅ How to Use:
1️⃣ Identifying Trend Direction:
If the percentage change is positive (green area) → Uptrend.
If the percentage change is negative (red area) → Downtrend.
2️⃣ Analyzing Movement Strength:
Compare the current percentage change with previous waves to evaluate the strength of the movement.
For example:
If previous waves reached 10% or more, a current wave of 3.5% might indicate a weak trend or a local correction.
3️⃣ Additional Filtering with the Main Line (Gray Line):
Use the Main Line to confirm the trend.
If the percentage change shows an increase, but the Main Line is still below 30, further upward movement can be expected.
If the percentage change indicates a decline, but the Main Line is above 70, there is a higher probability of a downward reversal.
"It's unfortunate that TradingView restricts adding images to indicator descriptions unless you have a paid subscription. This makes it harder to share free tools effectively."
Supertrend Strategy with Money Ocean TradeStrategy Overview
The Supertrend Strategy with Trend Change Confirmation leverages the Supertrend indicator to identify potential buy and sell signals based on changes in trend direction and subsequent price action. The strategy is designed to work with any financial instrument (symbol) and aims to provide clear entry and exit signals.
Key Components
Supertrend Indicator: The core of this strategy is the Supertrend indicator, calculated using a length of 3 and a factor of 1. The Supertrend line is plotted on the chart to visually represent trend direction.
Direction 1: Indicates an uptrend (bullish).
Direction -1: Indicates a downtrend (bearish).
Trend Change Detection: The strategy monitors changes in the trend direction. When a trend change is detected, it checks if the next candle confirms the trend change by breaking above or below the Supertrend line.
Entry Conditions:
Long Entry (Buy): When the Supertrend direction changes to 1 (uptrend) and the next candle closes above the Supertrend line.
Short Entry (Sell): When the Supertrend direction changes to -1 (downtrend) and the next candle closes below the Supertrend line.
Exit Conditions: The strategy closes the position based on the opposite signal.
Long Exit: When the Supertrend direction changes to -1 (downtrend) and the next candle closes below the Supertrend line.
Short Exit: When the Supertrend direction changes to 1 (uptrend) and the next candle closes above the Supertrend line.
Visual Signals: The strategy plots buy and sell signals on the chart using plotshape:
BUY: A green label below the bar when a long entry is triggered.
SELL: A red label above the bar when a short entry is triggered.
Alerts: Alerts are set up to notify when a buy or sell signal is triggered.
Script Summary
This strategy helps traders identify potential trading opportunities based on trend changes and confirms the trend by checking the next candle's price action. The visual signals and dashboard enhance the user's ability to monitor and manage trades effectively.
Feel free to test and adjust the parameters to suit your trading preferences! If you need further customizations or explanations, let me know.
[3Commas] HA & MAHA & MA
🔷What it does: This tool is designed to test a trend-following strategy using Heikin Ashi candles and moving averages. It enters trades after pullbacks, aiming to let profits run once the risk-to-reward ratio reaches 1:1 while securing the position.
🔷Who is it for: It is ideal for traders looking to compare final results using fixed versus dynamic take profits by adjusting parameters and trade direction—a concept applicable to most trading strategies.
🔷How does it work: We use moving averages to define the market trend, then wait for opposite Heikin Ashi candles to form against it. Once these candles reverse in favor of the trend, we enter the trade, using the last swing created by the pullback as the stop loss. By applying the breakeven ratio, we protect the trade and let it run, using the slower moving average as a trailing stop.
A buy signal is generated when:
The previous candle is bearish (ha_bear ), indicating a pullback.
The fast moving average (ma1) is above the slow moving average (ma2), confirming an uptrend.
The current candle is bullish (ha_bull), showing trend continuation.
The Heikin Ashi close is above the fast moving average (ma1), reinforcing the bullish bias.
The real price close is above the open (close > open), ensuring bullish momentum in actual price data.
The signal is confirmed on the closed candle (barstate.isconfirmed) to avoid premature signals.
dir is undefined (na(dir)), preventing repeated signals in the same direction.
A sell signal is generated when:
The previous candle is bullish (ha_bull ), indicating a temporary upward move before a potential reversal.
The fast moving average (ma1) is below the slow moving average (ma2), confirming a downtrend.
The current candle is bearish (ha_bear), showing trend continuation to the downside.
The Heikin Ashi close is below the fast moving average (ma1), reinforcing bearish pressure.
The real price close is below the open (close < open), confirming bearish momentum in actual price data.
The signal is confirmed after the candle closes (barstate.isconfirmed), avoiding premature entries.
dir is undefined (na(dir)), preventing consecutive signals in the same direction.
In simple terms, this setup looks for trend continuation after a pullback, confirming entries with both Heikin Ashi and real price action, supported by moving average alignment to avoid false signals.
If the price reaches a 1:1 risk-to-reward ratio, the stop will be moved to the entry point. However, if the slow moving average surpasses this level, it will become the new exit point, acting as a trailing stop
🔷Why It’s Unique
Easily visualizes the benefits of using risk-to-reward ratios when trading instead of fixed percentages.
Provides a simple and straightforward approach to trading, embracing the "keep it simple" concept.
Offers clear visualization of DCA Bot entry and exit points based on user preferences.
Includes an option to review the message format before sending signals to bots, with compatibility for multi-pair and futures contract pairs.
🔷 Considerations Before Using the Indicator
⚠️Very important: The indicator must be used on charts with real price data, such as Japanese candlesticks, line charts, etc. Do not use it on Heikin Ashi charts, as this may lead to unrealistic results.
🔸Since this is a trend-following strategy, use it on timeframes above 4 hours, where market noise is reduced and trends are clearer. Also, carefully review the statistics before using it, focusing on pairs that tend to have long periods of well-defined trends.
🔸Disadvantages:
False Signals in Ranges: Consolidating markets can generate unreliable signals.
Lagging Indicator: Being based on moving averages, it may react late to sudden price movements.
🔸Advantages:
Trend Focused: Simplifies the identification of trending markets.
Noise Reduction: Uses Heikin Ashi candles to identify trend continuation after pullbacks.
Broad Applicability: Suitable for forex, crypto, stocks, and commodities.
🔸The strategy provides a systematic way to analyze markets but does not guarantee successful outcomes. Use it as an additional tool rather than relying solely on an automated system.
Trading results depend on various factors, including market conditions, trader discipline, and risk management. Past performance does not ensure future success, so always approach the market cautiously.
🔸Risk Management: Define stop-loss levels, position sizes, and profit targets before entering any trade. Be prepared for potential losses and ensure your approach aligns with your overall trading plan.
🔷 STRATEGY PROPERTIES
Symbol: BINANCE:BTCUSDT (Spot).
Timeframe: 4h.
Test Period: All historical data available.
Initial Capital: 10000 USDT.
Order Size per Trade: 1% of Capital, you can use a higher value e.g. 5%, be cautious that the Max Drawdown does not exceed 10%, as it would indicate a very risky trading approach.
Commission: Binance commission 0.1%, adjust according to the exchange being used, lower numbers will generate unrealistic results. By using low values e.g. 5%, it allows us to adapt over time and check the functioning of the strategy.
Slippage: 5 ticks, for pairs with low liquidity or very large orders, this number should be increased as the order may not be filled at the desired level.
Margin for Long and Short Positions: 100%.
Indicator Settings: Default Configuration.
MA1 Length: 9.
MA2 Length: 18.
MA Calculations: EMA.
Take Profit Ratio: Disable. Ratio 1:4.
Breakeven Ratio: Enable, Ratio 1:1.
Strategy: Long & Short.
🔷 STRATEGY RESULTS
⚠️Remember, past results do not guarantee future performance.
Net Profit: +324.88 USDT (+3.25%).
Max Drawdown: -81.18 USDT (-0.78%).
Total Closed Trades: 672.
Percent Profitable: 35.57%.
Profit Factor: 1.347.
Average Trade: +0.48 USDT (+0.48%).
Average # Bars in Trades: 13.
🔷 HOW TO USE
🔸 Adjust Settings:
The default values—MA1 (9) and MA2 (18) with EMA calculation—generally work well. However, you can increase these values, such as 20 and 40, to better identify stronger trends.
🔸 Choose a Symbol that Typically Trends:
Select an asset that tends to form clear trends. Keep in mind that the Strategy Tester results may show poor performance for certain assets, making them less suitable for sending signals to bots.
🔸 Experiment with Ratios:
Test different take profit and breakeven ratios to compare various scenarios—especially to observe how the strategy performs when only the trade is protected.
🔸This is an example of how protecting the trade works: once the price moves in favor of the position with a 1:1 risk-to-reward ratio, the stop loss is moved to the entry price. If the Slow MA surpasses this level, it will act as a trailing stop, aiming to follow the trend and maximize potential gains.
🔸In contrast, in this example, for the same trade, if we set a take profit at a 1:3 risk-to-reward ratio—which is generally considered a good risk-reward relationship—we can see how a significant portion of the upward move is left on the table.
🔸Results Review:
It is important to check the Max Drawdown. This value should ideally not exceed 10% of your capital. Consider adjusting the trade size to ensure this threshold is not surpassed.
Remember to include the correct values for commission and slippage according to the symbol and exchange where you are conducting the tests. Otherwise, the results will not be realistic.
If you are satisfied with the results, you may consider automating your trades. However, it is strongly recommended to use a small amount of capital or a demo account to test proper execution before committing real funds.
🔸Create alerts to trigger the DCA Bot:
Verify Messages: Ensure the message matches the one specified by the DCA Bot.
Multi-Pair Configuration: For multi-pair setups, enable the option to add the symbol in the correct format.
Signal Settings: Enable whether you want to receive long or short signals (Entry | TP | SL), copy and paste the the messages for the DCA Bots configured.
Alert Setup:
When creating an alert, set the condition to the indicator and choose "alert() function call only.
Enter any desired Alert Name.
Open the Notifications tab, enable Webhook URL, and paste the Webhook URL.
For more details, refer to the section: "How to use TradingView Custom Signals".
Finalize Alerts: Click Create, you're done! Alerts will now be sent automatically in the correct format.
🔷 INDICATOR SETTINGS
MA 1: Fast MA Length
MA 2: Slow MA Length
MA Calc: MA's Calculations (SMA,EMA, RMA,WMA)
TP Ratio: This is the take profit ratio relative to the stop loss, where the trade will be closed in profit.
BE Ratio: This is the breakeven ratio relative to the stop loss, where the stop loss will be updated to breakeven or if the MA2 is greater than this level.
Strategy: Order Type direction in which trades are executed.
Use Custom Test Period: When enabled signals only works in the selected time window. If disabled it will use all historical data available on the chart.
Test Start and End: Once the Custom Test Period is enabled, here you select the start and end date that you want to analyze.
Check Messages: Enable the table to review the messages to be sent to the bot.
Entry | TP | SL: Enable this options to send Buy Entry, Take Profit (TP), and Stop Loss (SL) signals.
Deal Entry and Deal Exit : Copy and paste the message for the deal start signal and close order at Market Price of the DCA Bot. This is the message that will be sent with the alert to the Bot, you must verify that it is the same as the bot so that it can process properly so that it executes and starts the trade.
DCA Bot Multi-Pair: You must activate it if you want to use the signals in a DCA Bot Multi-pair in the text box you must enter (using the correct format) the symbol in which you are creating the alert, you can check the format of each symbol when you create the bot.
👨🏻💻💭 We hope this tool helps enhance your trading. Your feedback is invaluable, so feel free to share any suggestions for improvements or new features you'd like to see implemented.
__
The information and publications within the 3Commas TradingView account are not meant to be and do not constitute financial, investment, trading, or other types of advice or recommendations supplied or endorsed by 3Commas and any of the parties acting on behalf of 3Commas, including its employees, contractors, ambassadors, etc.
[SHORT ONLY] Consecutive Bars Above MA Strategy█ STRATEGY DESCRIPTION
The "Consecutive Bars Above MA Strategy" is a contrarian trading system aimed at exploiting overextended bullish moves in stocks and ETFs. It monitors the number of consecutive bars that close above a chosen short-term moving average (which can be either a Simple Moving Average or an Exponential Moving Average). Once the count reaches a preset threshold and the current bar’s close exceeds the previous bar’s high within a designated trading window, a short entry is initiated. An optional EMA filter further refines entries by requiring that the current close is below the 200-period EMA, helping to ensure that trades are taken in a bearish environment.
█ HOW ARE THE CONSECUTIVE BULLISH COUNTS CALCULATED?
The strategy utilizes a counter variable, `bullCount`, to track consecutive bullish bars based on their relation to the short-term moving average. Here’s how the count is determined:
Initialize the Counter
The counter is initialized at the start:
var int bullCount = na
Bullish Bar Detection
For each bar, if the close is above the selected moving average (either SMA or EMA, based on user input), the counter is incremented:
bullCount := close > signalMa ? (na(bullCount) ? 1 : bullCount + 1) : 0
Reset on Non-Bullish Condition
If the close does not exceed the moving average, the counter resets to zero, indicating a break in the consecutive bullish streak.
█ SIGNAL GENERATION
1. SHORT ENTRY
A short signal is generated when:
The number of consecutive bullish bars (i.e., bars closing above the short-term MA) meets or exceeds the defined threshold (default: 3).
The current bar’s close is higher than the previous bar’s high.
The signal occurs within the specified trading window (between Start Time and End Time).
Additionally, if the EMA filter is enabled, the entry is only executed when the current close is below the 200-period EMA.
2. EXIT CONDITION
An exit signal is triggered when the current close falls below the previous bar’s low, prompting the strategy to close the short position.
█ ADDITIONAL SETTINGS
Threshold: The number of consecutive bullish bars required to trigger a short entry (default is 3).
Trading Window: The Start Time and End Time inputs define when the strategy is active.
Moving Average Settings: Choose between SMA and EMA, and set the MA length (default is 5), which is used to assess each bar’s bullish condition.
EMA Filter (Optional): When enabled, this filter requires that the current close is below the 200-period EMA, supporting entries in a downtrend.
█ PERFORMANCE OVERVIEW
This strategy is designed for stocks and ETFs and can be applied across various timeframes.
It seeks to capture mean reversion by shorting after a series of bullish bars suggests an overextended move.
The approach employs a contrarian short entry by waiting for a breakout (close > previous high) following consecutive bullish bars.
The adjustable moving average settings and optional EMA filter allow for further optimization based on market conditions.
Comprehensive backtesting is recommended to fine-tune the threshold, moving average parameters, and filter settings for optimal performance.
Smart MA Crossover BacktesterSmart MA Crossover Backtester - Strategy Overview
Strategy Name: Smart MA Crossover Backtester
Published on: TradingView
Applicable Markets: Works well on crypto (tested profitably on ETH)
Strategy Concept
The Smart MA Crossover Backtester is an improved Moving Average (MA) crossover strategy that incorporates a trend filter and an ATR-based stop loss & take profit mechanism for better risk management. It aims to capture trends efficiently while reducing false signals by only trading in the direction of the long-term trend.
Core Components & Logic
Moving Averages (MA) for Entry Signals
Fast Moving Average (9-period SMA)
Slow Moving Average (21-period SMA)
A trade signal is generated when the fast MA crosses the slow MA.
Trend Filter (200-period SMA)
Only enters long positions if price is above the 200-period SMA (bullish trend).
Only enters short positions if price is below the 200-period SMA (bearish trend).
This helps in avoiding counter-trend trades, reducing whipsaws.
ATR-Based Stop Loss & Take Profit
Uses the Average True Range (ATR) with a multiplier of 2 to calculate stop loss.
Risk-Reward Ratio = 1:2 (Take profit is set at 2x ATR).
This ensures dynamic stop loss and take profit levels based on market volatility.
Trading Rules
✅ Long Entry (Buy Signal):
Fast MA (9) crosses above Slow MA (21)
Price is above the 200 MA (bullish trend filter active)
Stop Loss: Below entry price by 2× ATR
Take Profit: Above entry price by 4× ATR
✅ Short Entry (Sell Signal):
Fast MA (9) crosses below Slow MA (21)
Price is below the 200 MA (bearish trend filter active)
Stop Loss: Above entry price by 2× ATR
Take Profit: Below entry price by 4× ATR
Why This Strategy Works Well for Crypto (ETH)?
🔹 Crypto markets are highly volatile – ATR-based stop loss adapts dynamically to market conditions.
🔹 Long-term trend filter (200 MA) ensures trading in the dominant direction, reducing false signals.
🔹 Risk-reward ratio of 1:2 allows for profitable trades even with a lower win rate.
This strategy has been tested on Ethereum (ETH) and has shown profitable performance, making it a strong choice for crypto traders looking for trend-following setups with solid risk management. 🚀
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.
Dynamic Stop Loss & Take ProfitDynamic Stop Loss & Take Profit is a versatile risk management indicator that calculates dynamic stop loss and take profit levels based on the Average True Range (ATR). This indicator helps traders set adaptive exit points by using a configurable ATR multiplier and defining whether they are in a Long (Buy) or Short (Sell) trade.
How It Works
ATR Calculation – The indicator calculates the ATR value over a user-defined period (default: 14).
Stop Loss and Take Profit Multipliers – The ATR value is multiplied by a configurable factor (ranging from 1.5 to 4) to determine volatility-adjusted stop loss and take profit levels.
Trade Type Selection – The user can specify whether they are in a Long (Buy) or Short (Sell) trade.
Long (Buy) Trade:
Stop Loss = Entry Price - (ATR × Stop Loss Multiplier)
Take Profit = Entry Price + (ATR × Take Profit Multiplier)
Short (Sell) Trade:
Stop Loss = Entry Price + (ATR × Stop Loss Multiplier)
Take Profit = Entry Price - (ATR × Take Profit Multiplier)
Features
Configurable ATR length and multipliers
Supports both long and short trades
Clearly plotted Stop Loss (red) and Take Profit (green) levels on the chart
Helps traders manage risk dynamically based on market volatility
This indicator is ideal for traders looking to set adaptive stop loss and take profit levels without relying on fixed price targets.
Stochastic-Dynamic Volatility Band ModelThe Stochastic-Dynamic Volatility Band Model is a quantitative trading approach that leverages statistical principles to model market volatility and generate buy and sell signals. The strategy is grounded in the concepts of volatility estimation and dynamic market regimes, where the core idea is to capture price fluctuations through stochastic models and trade around volatility bands.
Volatility Estimation and Band Construction
The volatility bands are constructed using a combination of historical price data and statistical measures, primarily the standard deviation (σ) of price returns, which quantifies the degree of variation in price movements over a specific period. This methodology is based on the classical works of Black-Scholes (1973), which laid the foundation for using volatility as a core component in financial models. Volatility is a crucial determinant of asset pricing and risk, and it plays a pivotal role in this strategy's design.
Entry and Exit Conditions
The entry conditions are based on the price’s relationship with the volatility bands. A long entry is triggered when the price crosses above the lower volatility band, indicating that the market may have been oversold or is experiencing a reversal to the upside. Conversely, a short entry is triggered when the price crosses below the upper volatility band, suggesting overbought conditions or a potential market downturn.
These entry signals are consistent with the mean reversion theory, which asserts that asset prices tend to revert to their long-term average after deviating from it. According to Poterba and Summers (1988), mean reversion occurs due to overreaction to news or temporary disturbances, leading to price corrections.
The exit condition is based on the number of bars that have elapsed since the entry signal. Specifically, positions are closed after a predefined number of bars, typically set to seven bars, reflecting a short-term trading horizon. This exit mechanism is in line with short-term momentum trading strategies discussed in literature, where traders capitalize on price movements within specific timeframes (Jegadeesh & Titman, 1993).
Market Adaptability
One of the key features of this strategy is its dynamic nature, as it adapts to the changing volatility environment. The volatility bands automatically adjust to market conditions, expanding in periods of high volatility and contracting when volatility decreases. This dynamic adjustment helps the strategy remain robust across different market regimes, as it is capable of identifying both trend-following and mean-reverting opportunities.
This dynamic adaptability is supported by the adaptive market hypothesis (Lo, 2004), which posits that market participants evolve their strategies in response to changing market conditions, akin to the adaptive nature of biological systems.
References:
Black, F., & Scholes, M. (1973). The Pricing of Options and Corporate Liabilities. Journal of Political Economy, 81(3), 637-654.
Bollinger, J. (1980). Bollinger on Bollinger Bands. Wiley.
Jegadeesh, N., & Titman, S. (1993). Returns to Buying Winners and Selling Losers: Implications for Stock Market Efficiency. Journal of Finance, 48(1), 65-91.
Lo, A. W. (2004). The Adaptive Markets Hypothesis: Market Efficiency from an Evolutionary Perspective. Journal of Portfolio Management, 30(5), 15-29.
Poterba, J. M., & Summers, L. H. (1988). Mean Reversion in Stock Prices: Evidence and Implications. Journal of Financial Economics, 22(1), 27-59.
Money Flow Index MTF + Alerts with Candle Opacity & LabelsHow to Use the Money Flow Index MTF + Alerts with Candle Opacity & Labels Indicator
Overview:
This indicator is designed to help you gauge the buying and selling pressure in a market by using the Money Flow Index (MFI). Unlike many momentum oscillators, the MFI incorporates both price and volume, providing a unique perspective on market activity. It is particularly useful when you want to visually assess potential overbought or oversold conditions.
Indicator Components:
Money Flow Index (MFI) Calculation:
The indicator computes the MFI using a user-defined look-back period (default is 14 bars). The MFI is scaled between 0 and 100, where values above 80 typically indicate overbought conditions and values below 20 suggest oversold conditions.
Multi-Timeframe (MTF) Capability:
You can choose to calculate the MFI using either the current chart’s timeframe or a custom timeframe (for example, a 4-hour chart). This flexibility allows you to compare longer-term money flow trends against your primary trading timeframe.
Candle Opacity Based on MFI:
The opacity of the candles on your chart is dynamically adjusted based on the current MFI reading. When the MFI is high (near 100), candles become more opaque; when the MFI is low (near 0), candles appear more transparent. This visual cue can help you quickly spot changes in market momentum.
Visual Labels for Overbought/Oversold Conditions:
When the MFI crosses into the overbought territory, a red label reading “Overbought” is displayed above the high of the bar. Similarly, when it crosses into the oversold territory, a green label reading “Oversold” is placed below the low of the bar. These labels provide an immediate visual alert to potential reversal points or areas of caution.
Alert Conditions:
The script also includes alert conditions for both overbought and oversold signals. You can set up TradingView alerts so that you are notified in real time when the indicator detects these conditions.
Theory Behind the Money Flow Index (MFI):
The Money Flow Index is a momentum oscillator that uses both price and volume to signal the strength behind price moves.
Overbought Conditions: When the MFI is above 80, it suggests that buying pressure is very strong and the asset might be due for a pullback or consolidation.
Oversold Conditions: Conversely, when the MFI falls below 20, selling pressure is high and the asset might be oversold, potentially priming it for a bounce.
Keep in mind that in strong trending markets, overbought or oversold readings can persist for extended periods, so the MFI should be used in conjunction with other technical analysis tools.
Position Management Guidance:
While the indicator is useful for spotting potential overbought and oversold conditions, it is not designed to serve as an automatic signal to completely close a position. Instead, you might consider using it as a guide for pyramiding—gradually adding to your position over several days rather than exiting all at once. This approach allows you to better manage risk by:
Scaling In or Out Gradually: Instead of making one large position change, you can add or reduce your position in increments as market conditions evolve.
Diversifying Risk: Pyramiding helps you avoid the pitfalls of trying to time the market perfectly on a single trade exit or entry.
How to Get Started:
Apply the Indicator:
Add the indicator to your TradingView chart. Adjust the input settings (length, oversold/overbought levels, and resolution) as needed for your trading style and the market you’re analyzing.
Watch the Candles:
Observe the dynamic opacity of your candles. A sudden change in opacity can be a sign that the underlying money flow is shifting.
Monitor the Labels:
Pay attention to the “Overbought” or “Oversold” labels that appear. Use these cues in combination with your broader analysis to decide if it might be a good time to add to or gradually exit your position.
Set Up Alerts:
Configure TradingView alerts based on the indicator’s alert conditions so that you are notified when the MFI reaches extreme levels.
Use as Part of a Broader Strategy:
Remember, no single indicator should dictate your entire trading decision. Combine MFI signals with other technical analysis, risk management rules, and market insights to guide your trades.
GWAP (Gamma Weighted Average Price)Gamma Weighted Average Price (GWAP) Indicator
The Gamma Weighted Average Price (GWAP) is a dynamic financial indicator that applies exponentially decaying weights to historical prices to calculate a weighted average. The method leverages the exponential decay function, controlled by a gamma factor, to prioritize recent price data while gradually diminishing the influence of older observations. This approach builds upon techniques commonly found in time-series analysis, including Exponentially Weighted Moving Averages (EWMA), which are extensively used in financial modeling (Campbell, Lo & MacKinlay, 1997).
Theoretical Context and Justification
The gamma-weighted approach follows principles similar to those in Exponentially Weighted Moving Averages (EWMA), often used in volatility modeling, where weights decay exponentially over time. The exponential decay model can improve signal responsiveness compared to simple moving averages (Hyndman & Athanasopoulos, 2018). This design helps capture recent market dynamics without ignoring past trends, a common requirement in high-frequency trading systems (Bandi & Russell, 2006).
Practical Applications
1. Trend Detection:
The GWAP can help identify bullish and bearish trends:
• When the price is above GWAP, the market exhibits bullish momentum.
• Conversely, when the price is below GWAP, bearish momentum prevails.
2. Volatility Filtering:
Because of the gamma weighting mechanism, GWAP reduces the noise commonly seen in volatile markets, making it a useful tool for traders looking to smooth price fluctuations while retaining actionable signals.
3. Crossovers for Trade Signals:
Similar to moving average strategies, traders can use price crossovers with the GWAP as trade signals:
• Buy Signal: When the price crosses above the GWAP.
• Sell Signal: When the price crosses below the GWAP.
4. Adaptive Gamma Weighting:
The gamma factor allows for further customization.
• Higher gamma values (>1) place greater emphasis on older data, suitable for long-term trend analysis.
• Lower gamma values (<1) heavily weight recent price movements, ideal for fast-moving markets.
Example Use Case
A trader analyzing the S&P 500 may use a gamma factor of 0.92 with a 14-period GWAP to detect shifts in market sentiment during periods of heightened volatility. When the index price crosses above the GWAP, this could signal a potential recovery, prompting a buy entry. Conversely, when the price moves below the GWAP during a correction, it may suggest a short-selling opportunity.
Scientific References
• Campbell, J. Y., Lo, A. W., & MacKinlay, A. C. (1997). The Econometrics of Financial Markets. Princeton University Press.
• Hyndman, R. J., & Athanasopoulos, G. (2018). Forecasting: Principles and Practice. OTexts.
• Bandi, F. M., & Russell, J. R. (2006). Microstructure Noise, Realized Variance, and Optimal Sampling. Econometrica.
Triad Trade MatrixOverview
Triad Trade Matrix is an advanced multi-strategy indicator built using Pine Script v5. It is designed to simultaneously track and display key trading metrics for three distinct trading styles on a single chart:
Swing Trading (Swing Supreme):
This mode captures longer-term trends and is designed for trades that typically span several days. It uses customizable depth and deviation parameters to determine swing signals.
Day Trading (Day Blaze):
This mode focuses on intraday price movements. It generates signals that are intended to be executed within a single trading session. The parameters for depth and deviation are tuned to capture more frequent, shorter-term moves.
Scalping (Scalp Surge):
This mode is designed for very short-term trades where quick entries and exits are key. It uses more sensitive parameters to detect rapid price movements suitable for scalping strategies.
Each trading style is represented by its own merged table that displays real-time metrics. The tables update automatically as new trading signals are generated.
Key Features
Multi-Style Tracking:
Swing Supreme (Large): For swing trading; uses a purple theme.
Day Blaze (Medium): For day trading; uses an orange theme.
Scalp Surge (Small): For scalping; uses a green theme.
Real-Time Metrics:
Each table displays key trade metrics including:
Entry Price: The price at which the trade was entered.
Exit Price: The price at which the previous trade was exited.
Position Size: Calculated as the account size divided by the entry price.
Direction: Indicates whether the trade is “Up” (long) or “Down” (short).
Time: The time when the trade was executed (formatted to hours and minutes).
Wins/Losses: The cumulative number of winning and losing trades.
Current Price & PnL: The current price on the chart and the profit/loss computed relative to the entry price.
Duration: The number of bars that the trade has been open.
History Column: A merged summary column that shows the most recent trade’s details (entry, exit, and result).
Customizability:
Column Visibility: Users can toggle individual columns (Ticker, Timeframe, Entry, Exit, etc.) on or off according to their preference.
Appearance Settings: You can customize the table border width, frame color, header background, and text colors.
History Toggle: The merged history column can be enabled or disabled.
Chart Markers: There is an option to show or hide chart markers (labels and lines) that indicate trade entries and exits on the chart.
Trade History Management:
The indicator maintains a rolling history (up to three recent trades per trading style) and displays the latest summary in the merged table.
This history column provides a quick reference to recent performance.
How It Works
Signal Generation & Trade Metrics
Trade Entry/Exit Calculation:
For each trading style, the indicator uses built-in functions (such as ta.lowestbars and ta.highestbars) to analyze price movements. Based on a customizable "depth" and "deviation" parameter, it determines the point of entry for a trade.
Swing Supreme: Uses larger depth/deviation values to capture swing trends.
Day Blaze: Uses intermediate values for intraday moves.
Scalp Surge: Uses tighter parameters to pick up rapid price changes.
Metrics Update:
When a new trade signal is generated (i.e., when the trade entry price is updated), the indicator calculates:
The current PnL as the difference between the current price and the entry price (or vice versa, depending on the trade direction).
The duration as the number of bars since the trade was opened.
The position size using the formula: accountSize / entryPrice.
History Recording:
Each time a new trade is triggered (i.e., when the entry price is updated), a summary string is created (showing entry, exit, and win/loss status) and appended to the corresponding trade history array. The merged table then displays the latest summary from this history.
Table Display
Merged Table Structure:
Each trading style (Swing Supreme, Day Blaze, and Scalp Surge) is represented by a table that has 15 columns. The columns are:
Trade Type (e.g., Swing Supreme)
Ticker
Timeframe
Entry Price
Exit Price
Position Size
Direction
Time of Entry
Account Size
Wins
Losses
Current Price
Current PnL
Duration (in bars)
History (the latest trade summary)
User Customization:
Through the settings panel, users can choose which columns to display.
If a column is toggled off, its cells will remain blank, allowing traders to focus on the metrics that matter most to them.
Appearance & Themes:
The table headers and cell backgrounds are customizable via color inputs. The trading style names are color-coded:
Swing Supreme (Large): Uses a purple theme.
Day Blaze (Medium): Uses an orange theme.
Scalp Surge (Small): Uses a green theme.
How to Use the Indicator
Add the Indicator to Your Chart:
Once published, add "Triad Trade Matrix" to your TradingView chart.
Configure the Settings:
Adjust the Account Size to match your trading capital.
Use the Depth and Deviation inputs for each trading style to fine-tune the signal sensitivity.
Toggle the Chart Markers on if you want visual entry/exit markers on the chart.
Customize which columns are visible via the column visibility toggles.
Enable or disable the History Column to show the merged trade history in the table.
Adjust the appearance settings (colors, border width, etc.) to suit your chart background and preferences.
Interpret the Tables:
Swing Supreme:
This table shows metrics for swing trades.
Look for changes in entry price, PnL, and trade duration to monitor longer-term moves.
Day Blaze:
This table tracks day trading activity.It will update more frequently, reflecting intraday trends.
Scalp Surge:
This table is dedicated to scalping signals.Use it to see quick entry/exit data and rapid profit/loss changes.
The History column (if enabled) gives you a snapshot of the most recent trade (e.g., "E:123.45 X:124.00 Up Win").
Use allerts:
The indicator includes alert condition for new trade entries(both long and short)for each trading style.
Summary:
Triad Trade Matrix provides an robust,multi-dimensional view of your trading performance across swing trading, day trading, and scalping.
Best to be used whith my other indicators
True low high
Vma Ext_Adv_CustomTbl
This indicator is ideal for traders who wish to monitor multiple trading styles simultaneously, with a clear, technical, and real-time display of performance metrics.
Happy Trading!
Market Structure HH, HL, LH and LLMarket Structure Indicator (HH, HL, LH, LL) – Explanation and Usage
Overview:
This indicator is designed to detect and visualize market structure shifts by identifying Higher Highs (HH), Higher Lows (HL), Lower Highs (LH), and Lower Lows (LL). It plots a ZigZag structure to mark trend changes, helping traders analyze price swings and market direction.
Indicator Logic:
The indicator operates based on ZigZag swing points to define trend shifts and structure changes.
Identifying Market Swings:
It finds local highs and lows using the ZigZag Length (zigzag_len), which defines how many bars back to check for a new swing high/low.
If the current high is the highest over zigzag_len periods, it marks it as a swing high.
If the current low is the lowest over zigzag_len periods, it marks it as a swing low.
Determining Market Structure:
Uptrend: Higher Highs (HH) & Higher Lows (HL)
Downtrend: Lower Lows (LL) & Lower Highs (LH)
The script continuously tracks the last two highs (h0, h1) and last two lows (l0, l1) to classify the current market structure.
Visual Elements:
ZigZag Line (Optional): Connects major swing highs and lows for trend visualization.
Labels (HH, HL, LH, LL):
HH (Higher High) – Price is making new highs → Uptrend Continuation.
HL (Higher Low) – Price forms a higher bottom → Uptrend Confirmation.
LL (Lower Low) – Price is making new lows → Downtrend Continuation.
LH (Lower High) – Price forms a lower top → Downtrend Confirmation.
Breakout Confirmation with Fibonacci Factor (Optional)
The indicator includes an option to confirm breakouts using the fib_factor, which ensures price moves beyond a certain retracement level.
How to Use This Indicator in Trading:
1. Identifying Trends & Trend Reversals
Uptrend: Look for a sequence of HH and HL.
Downtrend: Look for a sequence of LL and LH.
Trend Reversal: If price transitions from HH-HL to LH-LL, it signals a shift from an uptrend to a downtrend (and vice versa).
2. Confirming Entry & Exit Points
Buy Entry (Long Position)
Enter after a Higher Low (HL) is confirmed in an uptrend.
Combine with support zones or moving averages for confirmation.
Sell Entry (Short Position)
Enter after a Lower High (LH) is confirmed in a downtrend.
Combine with resistance zones or moving averages for confirmation.
Exit Strategy
Exit long trades when price fails to make a HH and forms an LH instead.
Exit short trades when price fails to make a LL and forms an HL instead.
3. Spotting Breakouts & Order Blocks
The Fib Factor setting allows traders to filter false breakouts by confirming price movement beyond a retracement threshold.
Potential Order Blocks can be identified by looking at the last major swing point before a breakout.
Benefits of This Indicator for Traders
✅ Trend Identification: Helps traders quickly determine if the market is in an uptrend or downtrend.
✅ Clear Market Structure Labels: Easily visualizes Higher Highs, Higher Lows, Lower Highs, and Lower Lows.
✅ Avoids Noise: The ZigZag algorithm removes small fluctuations and focuses on significant market movements.
✅ Assists with Entry & Exit Decisions: Provides objective signals for trend continuation or reversals.
✅ Works in All Markets: Useful for stocks, forex, crypto, and futures trading.
Would you like me to add additional features like Order Blocks, Breakout Confirmation, or Alerts to improve this indicator? 🚀
[COG] Adaptive Squeeze Intensity 📊 Adaptive Squeeze Intensity (ASI) Indicator
🎯 Overview
The Adaptive Squeeze Intensity (ASI) indicator is an advanced technical analysis tool that combines the power of volatility compression analysis with momentum, volume, and trend confirmation to identify high-probability trading opportunities. It quantifies the degree of price compression using a sophisticated scoring system and provides clear entry signals for both long and short positions.
⭐ Key Features
- 📈 Comprehensive squeeze intensity scoring system (0-100)
- 📏 Multiple Keltner Channel compression zones
- 📊 Volume analysis integration
- 🎯 EMA-based trend confirmation
- 🎨 Proximity-based entry validation
- 📱 Visual status monitoring
- 🎨 Customizable color schemes
- ⚡ Clear entry signals with directional indicators
🔧 Components
1. 📐 Squeeze Intensity Score (0-100)
The indicator calculates a total squeeze intensity score based on four components:
- 📊 Band Convergence (0-40 points): Measures the relationship between Bollinger Bands and Keltner Channels
- 📍 Price Position (0-20 points): Evaluates price location relative to the base channels
- 📈 Volume Intensity (0-20 points): Analyzes volume patterns and thresholds
- ⚡ Momentum (0-20 points): Assesses price momentum and direction
2. 🎨 Compression Zones
Visual representation of squeeze intensity levels:
- 🔴 Extreme Squeeze (80-100): Red zone
- 🟠 Strong Squeeze (60-80): Orange zone
- 🟡 Moderate Squeeze (40-60): Yellow zone
- 🟢 Light Squeeze (20-40): Green zone
- ⚪ No Squeeze (0-20): Base zone
3. 🎯 Entry Signals
The indicator generates entry signals based on:
- ✨ Squeeze release confirmation
- ➡️ Momentum direction
- 📊 Candlestick pattern confirmation
- 📈 Optional EMA trend alignment
- 🎯 Customizable EMA proximity validation
⚙️ Settings
🔧 Main Settings
- Base Length: Determines the calculation period for main indicators
- BB Multiplier: Sets the Bollinger Bands deviation multiplier
- Keltner Channel Multipliers: Three separate multipliers for different compression zones
📈 Trend Confirmation
- Four customizable EMA periods (default: 21, 34, 55, 89)
- Optional trend requirement for entry signals
- Adjustable EMA proximity threshold
📊 Volume Analysis
- Customizable volume MA length
- Adjustable volume threshold for signal confirmation
- Option to enable/disable volume analysis
🎨 Visualization
- Customizable bullish/bearish colors
- Optional intensity zones display
- Status monitor with real-time score and state information
- Clear entry arrows and background highlights
💻 Technical Code Breakdown
1. Core Calculations
// Base calculations for EMAs
ema_1 = ta.ema(close, ema_length_1)
ema_2 = ta.ema(close, ema_length_2)
ema_3 = ta.ema(close, ema_length_3)
ema_4 = ta.ema(close, ema_length_4)
// Proximity calculation for entry validation
ema_prox_raw = math.abs(close - ema_1) / ema_1 * 100
is_close_to_ema_long = close > ema_1 and ema_prox_raw <= prox_percent
```
### 2. Squeeze Detection System
```pine
// Bollinger Bands setup
BB_basis = ta.sma(close, length)
BB_dev = ta.stdev(close, length)
BB_upper = BB_basis + BB_mult * BB_dev
BB_lower = BB_basis - BB_mult * BB_dev
// Keltner Channels setup
KC_basis = ta.sma(close, length)
KC_range = ta.sma(ta.tr, length)
KC_upper_high = KC_basis + KC_range * KC_mult_high
KC_lower_high = KC_basis - KC_range * KC_mult_high
```
### 3. Scoring System Implementation
```pine
// Band Convergence Score
band_ratio = BB_width / KC_width
convergence_score = math.max(0, 40 * (1 - band_ratio))
// Price Position Score
price_range = math.abs(close - KC_basis) / (KC_upper_low - KC_lower_low)
position_score = 20 * (1 - price_range)
// Final Score Calculation
squeeze_score = convergence_score + position_score + vol_score + mom_score
```
### 4. Signal Generation
```pine
// Entry Signal Logic
long_signal = squeeze_release and
is_momentum_positive and
(not use_ema_trend or (bullish_trend and is_close_to_ema_long)) and
is_bullish_candle
short_signal = squeeze_release and
is_momentum_negative and
(not use_ema_trend or (bearish_trend and is_close_to_ema_short)) and
is_bearish_candle
```
📈 Trading Signals
🚀 Long Entry Conditions
- Squeeze release detected
- Positive momentum
- Bullish candlestick
- Price above relevant EMAs (if enabled)
- Within EMA proximity threshold (if enabled)
- Sufficient volume confirmation (if enabled)
🔻 Short Entry Conditions
- Squeeze release detected
- Negative momentum
- Bearish candlestick
- Price below relevant EMAs (if enabled)
- Within EMA proximity threshold (if enabled)
- Sufficient volume confirmation (if enabled)
⚠️ Alert Conditions
- 🔔 Extreme squeeze level reached (score crosses above 80)
- 🚀 Long squeeze release signal
- 🔻 Short squeeze release signal
💡 Tips for Usage
1. 📱 Use the status monitor to track real-time squeeze intensity and state
2. 🎨 Pay attention to the color gradient for trend direction and strength
3. ⏰ Consider using multiple timeframes for confirmation
4. ⚙️ Adjust EMA and proximity settings based on your trading style
5. 📊 Use volume analysis for additional confirmation in liquid markets
📝 Notes
- 🔧 The indicator combines multiple technical analysis concepts for robust signal generation
- 📈 Suitable for all tradable markets and timeframes
- ⭐ Best results typically achieved in trending markets with clear volatility cycles
- 🎯 Consider using in conjunction with other technical analysis tools for confirmation
⚠️ Disclaimer
This technical indicator is designed to assist in analysis but should not be considered as financial advice. Always perform your own analysis and risk management when trading.
One Trading Setup for Life ICT [TradingFinder] Sweep Session FVG🔵 Introduction
ICT One Trading Setup for Life is a trading strategy based on liquidity and market structure shifts, utilizing the PM Session Sweep to determine price direction. In this strategy, the market first forms a price range during the PM Session (from 13:30 to 16:00 EST), which includes the highest high (PM Session High) and lowest low (PM Session Low).
In the next session, the price first touches one of these levels to trigger a Liquidity Hunt before confirming its trend by breaking the Change in State of Delivery (CISD) Level. After this confirmation, the price retraces toward a Fair Value Gap (FVG) or Order Block (OB), which serve as the best entry points in alignment with liquidity.
In financial markets, liquidity is the primary driver of price movement, and major market participants such as institutional investors and banks are constantly seeking liquidity at key levels. This process, known as Liquidity Hunt or Liquidity Sweep, occurs when the price reaches an area with a high concentration of orders, absorbs liquidity, and then reverses direction.
In this setup, the PM Session range acts as a trading framework, where its highs and lows function as key liquidity zones that influence the next session’s price movement. After the New York market opens at 9:30 EST, the price initially breaks one of these levels to capture liquidity.
However, for a trend shift to be confirmed, the CISD Level must be broken.
Once the CISD Level is breached, the price retraces toward an FVG or OB, which serve as optimal trade entry points.
Bullish Setup :
Bearish Setup :
🔵 How to Use
In this strategy, the PM Session range is first identified, which includes the highest high (PM Session High) and lowest low (PM Session Low) between 13:30 and 16:00 EST. In the following session, the price touches one of these levels for a Liquidity Hunt, followed by a break of the Change in State of Delivery (CISD) Level. The price then retraces toward a Fair Value Gap (FVG) or Order Block (OB), creating a trading opportunity.
This process can occur in two scenarios : bearish and bullish setups.
🟣 Bullish Setup
In a bullish scenario, the PM Session High and PM Session Low are identified. In the following session, the price first breaks the PM Session Low, absorbing liquidity. This process results in a Fake Breakout to the downside, misleading retail traders into taking short positions.
After the Liquidity Hunt, the CISD Level is broken, confirming a trend reversal. The price then retraces toward an FVG or OB, offering an optimal long entry opportunity.
The initial take-profit target is the PM Session High, but if higher timeframe liquidity levels exist, extended targets can be set.
The stop-loss should be placed below the Fake Breakout low or the first candle of the FVG.
🟣 Bearish Setup
In a bearish scenario, the market first defines its PM Session High and PM Session Low. In the next session, the price initially breaks the PM Session High, triggering a Liquidity Hunt. This movement often causes a Fake Breakout, misleading retail traders into taking incorrect positions.
After absorbing liquidity, the CISD Level breaks, indicating a shift in market structure. The price then retraces toward an FVG or OB, offering the best short entry opportunity.
The initial take-profit target is the PM Session Low, but if additional liquidity exists on higher timeframes, lower targets can be considered.
The stop-loss should be placed above the Fake Breakout high or the first candle of the FVG.
🔵 Setting
CISD Bar Back Check : The Bar Back Check option enables traders to specify the number of past candles checked for identifying the CISD Level, enhancing CISD Level accuracy on the chart.
Order Block Validity : The number of candles that determine the validity of an Order Block.
FVG Validity : The duration for which a Fair Value Gap remains valid.
CISD Level Validity : The duration for which a CISD Level remains valid after being broken.
New York PM Session : Defines the PM Session range from 13:30 to 16:00 EST.
New York AM Session : Defines the AM Session range from 9:30 to 16:00 EST.
Refine Order Block : Enables finer adjustments to Order Block levels for more accurate price responses.
Mitigation Level OB : Allows users to set specific reaction points within an Order Block, including: Proximal: Closest level to the current price. 50% OB: Midpoint of the Order Block. Distal: Farthest level from the current price.
FVG Filter : The Judas Swing indicator includes a filter for Fair Value Gap (FVG), allowing different filtering based on FVG width: FVG Filter Type: Can be set to "Very Aggressive," "Aggressive," "Defensive," or "Very Defensive." Higher defensiveness narrows the FVG width, focusing on narrower gaps.
Mitigation Level FVG : Like the Order Block, you can set price reaction levels for FVG with options such as Proximal, 50% OB, and Distal.
Demand Order Block : Enables or disables bullish Order Block.
Supply Order Block : Enables or disables bearish Order Blocks.
Demand FVG : Enables or disables bullish FVG.
Supply FVG : Enables or disables bearish FVGs.
Show All CISD : Enables or disables the display of all CISD Levels.
Show High CISD : Enables or disables high CISD levels.
Show Low CISD : Enables or disables low CISD levels.
🔵 Conclusion
The ICT One Trading Setup for Life is a liquidity-based strategy that leverages market structure shifts and precise entry points to identify high-probability trade opportunities. By focusing on PM Session High and PM Session Low, this setup first captures liquidity at these levels and then confirms trend shifts with a break of the Change in State of Delivery (CISD) Level.
Entering a trade after a retracement to an FVG or OB allows traders to position themselves at optimal liquidity levels, ensuring high reward-to-risk trades. When used in conjunction with higher timeframe bias, order flow, and liquidity analysis, this strategy can become one of the most effective trading methods within the ICT Concept framework.
Successful execution of this setup requires risk management, patience, and a deep understanding of liquidity dynamics. Traders can enhance their confidence in this strategy by conducting extensive backtesting and analyzing past market data to optimize their approach for different assets.
CCI Buy and Sell Signals with 20/30 EMACCI Buy and Sell Signals with EMA and ATR Stop Loss/Take Profit
This indicator is designed to identify buy and sell signals based on a combination of the Commodity Channel Index (CCI) and Exponential Moving Averages (EMA). It also includes an optional ATR-based stop loss and take profit system, which is useful for traders who want to manage their trades with dynamic risk levels.
Features:
CCI Buy and Sell Signals:
Buy Signal: A buy signal is triggered when the CCI crosses up through -100 (from an oversold condition), the 20-period EMA is above the 30-period EMA, and the price is above the 200-period EMA. This suggests that the market is entering an upward trend.
Sell Signal: A sell signal is triggered when the CCI crosses down through +100 (from an overbought condition), the 20-period EMA is below the 30-period EMA, and the price is below the 200-period EMA. This suggests that the market is entering a downward trend.
Exponential Moving Averages (EMA):
The script plots three EMAs:
20-period EMA (Green): Used to identify short-term trends.
30-period EMA (Red): Used to capture medium-term trends.
200-period EMA (Orange): A long-term trend filter, with the price above it generally indicating bullish conditions and below it indicating bearish conditions.
ATR-Based Stop Loss and Take Profit:
Optional Feature: The ATR (Average True Range) indicator can be used to set stop loss and take profit levels based on market volatility.
Stop Loss: Set at a multiple of the ATR below the entry price for long positions and above the entry price for short positions.
Take Profit: Set at a multiple of the ATR above the entry price for long positions and below the entry price for short positions.
Customizable: You can adjust the ATR length, Stop Loss Multiplier, and Take Profit Multiplier through the settings.
Dots: The stop loss and take profit levels are plotted as dots on the chart when the ATR feature is enabled.
Alert Conditions:
Buy Signal Alert: Triggered when a buy signal occurs based on CCI crossing up -100 and other conditions being met.
Sell Signal Alert: Triggered when a sell signal occurs based on CCI crossing down +100 and other conditions being met.
Any Signal Alert: This is a combined alert that triggers for either a buy or sell signal. It helps you stay updated on both types of signals simultaneously.
How to Use:
The indicator will plot buy and sell arrows on the chart, giving clear entry points for trades based on CCI and EMA conditions.
The ATR stop loss and take profit dots (when enabled) provide automatic risk management levels, adjusting dynamically with market volatility.
Traders can customize the ATR settings to fine-tune their stop loss and take profit levels, making this strategy adaptable to different trading styles and market conditions.
Twitter Model ICT [TradingFinder] MMXM ERL D + FVG + M15 MSS/SMT🔵 Introduction
The Twitter Model ICT is a trading approach based on ICT (Inner Circle Trader) models, focusing on price movement between external and internal liquidity in lower timeframes. This model integrates key concepts such as Market Structure Shift (MSS), Smart Money Technique (SMT) divergence, and CISD level break to identify precise entry points in the market.
The primary goal of this model is to determine key liquidity levels, such as the previous day’s high and low (PDH/PDL) and align them with the Fair Value Gap (FVG) in the 1-hour timeframe. The overall strategy involves framing trades around the 1H FVG and using the M15 Market Structure Shift (MSS) for entry confirmation.
The Twitter Model ICT is designed to utilize external liquidity levels, such as PDH/PDL, as key entry zones. The model identifies FVG in the 1-hour timeframe, which acts as a magnet for price movement. Additionally, traders confirm entries using M15 Market Structure Shift (MSS) and SMT divergence.
Bullish Twitter Model :
In a bullish setup, the price sweeps the previous day’s low (PDL), and after confirming reversal signals, buys are executed in internal liquidity zones. Conversely, in a bearish setup, the price sweeps the previous day’s high (PDH), and after confirming weakness signals, sells are executed.
Bearish Twitter Model :
In short setups, entries are only executed above the Midnight Open, while in long setups, entries are taken below the Midnight Open. Adhering to these principles allows traders to define precise entry and exit points and analyze price movement with greater accuracy based on liquidity and market structure.
🔵 How to Use
The Twitter Model ICT is a liquidity-based trading strategy that analyzes price movements relative to the previous day’s high and low (PDH/PDL) and Fair Value Gap (FVG). This model is applicable in both bullish and bearish directions and utilizes the 1-hour (1H) and 15-minute (M15) timeframes for entry confirmation.
The price first sweeps an external liquidity level (PDH or PDL) and then provides an entry opportunity based on Market Structure Shift (MSS) and SMT divergence. Additionally, the entry should be positioned relative to the Midnight Open, meaning long entries should occur below the Midnight Open and short entries above it.
🟣 Bullish Twitter Model
In a bullish setup, the price first sweeps the previous day’s low (PDL) and reaches an external liquidity level. Then, in the 1-hour timeframe (1H), a bullish Fair Value Gap (FVG) forms, which serves as the price target.
To confirm the entry, a Market Structure Shift (MSS) in the 15-minute timeframe (M15) should be observed, signaling a trend reversal to the upside. Additionally, SMT divergence with correlated assets can indicate weakness in selling pressure.
Under these conditions, a long position is taken below the Midnight Open, with a stop-loss placed at the lowest point of the recent bearish move. The price target for this trade is the FVG in the 1-hour timeframe.
🟣 Bearish Twitter Model
In a bearish setup, the price first sweeps the previous day’s high (PDH) and reaches an external liquidity level. Then, in the 1-hour timeframe (1H), a bearish Fair Value Gap (FVG) is identified, serving as the trade target.
To confirm entry, a Market Structure Shift (MSS) in the 15-minute timeframe (M15) should form, signaling a trend shift to the downside. If an SMT divergence is present, it can provide additional confirmation for the trade.
Once these conditions are met, a short position is taken above the Midnight Open, with a stop-loss placed at the highest level of the recent bullish move. The trade's price target is the FVG in the 1-hour timeframe.
🔵 Settings
Bar Back Check : Determining the return of candles to identify the CISD level.
CISD Level Validity : CISD level validity period based on the number of candles.
Daily Position : Determines whether only the first signal of the day is considered or if signals are evaluated throughout the entire day.
Session : Specifies in which trading sessions the indicator will be active.
Second Symbol : This setting allows you to select another asset for comparison with the primary asset. By default, "XAUUSD" (Gold) is set as the second symbol, but you can change it to any currency pair, stock, or cryptocurrency. For example, you can choose currency pairs like EUR/USD or GBP/USD to identify divergences between these two assets.
Divergence Fractal Periods : This parameter defines the number of past candles to consider when identifying divergences. The default value is 2, but you can change it to suit your preferences. This setting allows you to detect divergences more accurately by selecting a greater number of candles.
The indicator allows displaying sessions based on various time zones. The user can select one of the following options :
UTC (Coordinated Universal Time)
Local Time of the Session
User’s Local Time
Show Open Price : Displays the New York market opening price.
Show PDH / PDL : Displays the previous day’s high and low to identify potential entry points.
Show SMT Divergence : Displays lines and labels for bullish ("+SMT") and bearish ("-SMT") divergences.
🔵 Conclusion
The Twitter Model ICT is an effective approach for analyzing and executing trades in financial markets, utilizing a combination of liquidity principles, market structure, and SMT confirmations to identify optimal entry and exit points.
By analyzing the previous day’s high and low (PDH/PDL), Fair Value Gaps (FVG), and Market Structure Shift (MSS) in the 1H and M15 timeframes, traders can pinpoint liquidity-driven trade opportunities. Additionally, considering the Midnight Open level helps traders avoid random entries and ensures better trade placement.
By applying this model, traders can interpret market movements based on liquidity flow and structural changes, allowing them to fine-tune their trading decisions with higher precision. Ultimately, the Twitter Model ICT provides a structured and logical approach for traders who seek to trade based on liquidity behavior and trend shifts in the market.
John Bob-Trading-BotDeveloped by Ayebale John Bob with the help of his bestie, this innovative strategy combines advanced Smart Money Concepts with practical risk management tools to help traders identify and capitalize on key market moves.
Key Features:
Smart Money Concepts & Fair Value Gaps (FVG):
The strategy monitors price action for fair value gaps, which are visualized as extremely faint horizontal lines on the chart. These FVGs signal potential areas where institutional traders might have entered or exited positions.
Dynamic Entry Signals:
Buy signals are triggered when the price crosses above the 50-bar lowest low or when a bullish FVG is detected. Conversely, sell signals are generated when the price falls below the 50-bar highest high or a bearish FVG is identified. Each signal is visually marked on the chart with clear buy (green) and sell (red) labels.
Multi-Level Order Execution:
Once an entry signal occurs, the strategy places five separate orders, each with its own take-profit (TP) level. The TP levels are calculated dynamically using the Average True Range (ATR) and a set of predefined multipliers. This allows traders to scale out of positions as the market moves favorably.
Dynamic Risk Management:
A stop-loss is automatically set at a distance determined by the ATR, ensuring that risk is managed in accordance with current market volatility.
Real-Time Trade Information Table:
In the bottom-right corner of the chart, a trade information table displays essential details about the current trade:
Side: Displays "BUY NOW" (with a dark green background) for long entries or "SELL NOW" (with a dark red background) for short entries.
Entry Price & Stop-Loss: Shows the entry price (highlighted in green) and the corresponding stop-loss level (highlighted in red).
Take-Profit Levels: Lists the five TP levels, each of which turns green once the market price reaches that target.
Timer: A live timer in minutes counts from the moment the current trade trigger started, helping traders track the duration of their active trades.
Visual Progress Bar:
A histogram-style progress bar is plotted on the chart, visually representing the percentage gain (or loss) relative to the entry price.
This strategy was meticulously designed to incorporate both technical analysis and smart risk management, offering a robust trading solution that adapts to changing market conditions. Whether you're a seasoned trader or just starting out, the AyebaleJohnBob Trading Bot equips you with the tools and visual cues needed to make well-informed trading decisions. Enjoy a seamless blend of strategy and style—crafted with passion by Ayebale John Bob and his bestie!
Position Tracker 1.0Position Tracker 1.0 allows users to input their position using USD, quantity, or a DCA approach while setting take profit (TP) and stop loss (SL) levels based on either fixed dollar values or percentages. The indicator provides optional markers for TP/SL crossings and an entry label showing key trade details. A live tracker can be enabled for real-time P&L updates, and all visual elements are customizable for clarity and preference.
Instructions for Position Tracker 1.0
1. Input Method & Position Details:
* Choose between USD, Quantity, or DCA.
* Enter your entry price, entry time, investment amount, or quantity as needed.
2. TP & SL Setup:
* For each TP (up to 5) and the SL, select whether to use a fixed dollar target or a percentage
target relative to your entry price.
* Enter the corresponding price (if using Dollar) or percentage (if using Percentage).
* For TPs, specify the percentage of your position to sell when the level is hit.
3. Marker & Display Options:
* Toggle the TP and SL crossing markers on or off.
* Adjust which details (Price, Diff, Sell for TP; Price, Diff, Loss for SL) are shown on the labels.
* The entry label always shows the Avg. Cost and can optionally include the quantity, invested
amount, and live tracker (real-time P&L).
4. Visual Customization:
* Change text size, marker size, and colors for profit, loss, TP, and SL lines as desired.
Johnny's Volatility-Driven Trend Identifier w/ Reversal SignalsJohnny's Volatility-Driven Trend Identifier w/ Reversal Signals is designed to identify high-probability trend shifts and reversals by incorporating volatility, momentum, and impulse-based filtering. It is specifically built for traders who want to capture strong trend movements while minimizing false signals caused by low volatility noise.
By leveraging Rate of Change (ROC), Relative Strength Index (RSI), and Average True Range (ATR)-based volatility detection, the indicator dynamically adapts to market conditions. It highlights breakout trends, reversals, and early signs of momentum shifts using strategically placed labels and color-coded trend visualization.
Inspiration taken from Top G indicator .
What This Indicator Does
The Volatility-Driven Trend Identifier works by:
Measuring Market Extremes & Momentum:
Uses ROC normalization with standard deviation to identify impulse moves in price action.
Implements RSI filtering to determine overbought/oversold conditions that validate trend strength.
Utilizes ATR-based volatility tracking to ensure signals only appear when meaningful market movements are occurring.
Identifying Key Trend Events:
Power Peak (🔥): Marks a confirmed strong downtrend, ideal for shorting opportunities.
Surge (🚀): Indicates a confirmed strong uptrend, signaling a potential long entry.
Soft Surge (↗): Highlights a mild bullish reentry or early uptrend formation.
Soft Peak (↘): Shows a mild bearish reentry or early downtrend formation.
Providing Adaptive Filtering for Reliable Signals:
Filters out weak trends with a volatility check, ensuring signals appear only in strong market conditions.
Implements multi-level confirmation by combining trend strength metrics, preventing false breakouts.
Uses gradient-based visualization to color-code market sentiment for quick interpretation.
What This Indicator Signals
Breakouts & Impulse Moves: 🚀🔥
The Surge (🚀) and Power Peak (🔥) labels indicate confirmed momentum breakouts, where the trend has been validated by a combination of ROC impulse, RSI confirmation, and ATR volatility filtering.
These signals suggest that the market is entering a strong trend, and traders can align their entries accordingly.
Early Trend Formation & Reentries: ↗ ↘
The Soft Surge (↗) and Soft Peak (↘) labels indicate areas where a trend might be forming, but is not yet fully confirmed.
These signals help traders anticipate potential entries before the trend gains full strength.
Volatility-Adaptive Trend Filtering: 📊
Since the indicator only activates in volatile conditions, it avoids the pitfalls of low-range choppy markets where false signals frequently occur.
ATR-driven adaptive windowing allows the indicator to dynamically adjust its sensitivity based on real-time volatility conditions.
How to Use This Indicator
1. Identifying High-Probability Entries
Bullish Entries (Long Trades)
Look for 🚀 Surge signals in an uptrend.
Confirm with RSI (should be above 50 for momentum).
Ensure volatility is increasing to validate the breakout.
Use ↗ Soft Surge signals for early entries before the trend fully confirms.
Bearish Entries (Short Trades)
Look for 🔥 Power Peak signals in a downtrend.
RSI should be below 50, indicating downward momentum.
Volatility should be rising, ensuring market momentum is strong.
Use ↘ Soft Peak signals for early entries before a full bearish confirmation.
2. Avoiding False Signals
Ignore signals when the market is ranging (low ATR).
Check RSI and ROC alignment to ensure trend confirmation.
Use additional confluences (e.g., price action, support/resistance levels, moving averages) for enhanced accuracy.
3. Trend Confirmation & Filtering
The stronger the trend, the higher the likelihood that Surge (🚀) and Power Peak (🔥) signals will continue in their direction.
Soft Surge (↗) and Soft Peak (↘) act as early warning signals before major breakouts occur.
What Makes This a Machine Learning-Inspired Moving Average?
While this indicator is not a direct implementation of machine learning (as Pine Script lacks AI/ML capabilities), it mimics machine learning principles by adapting dynamically to market conditions using the following techniques:
Adaptive Trend Selection:
It does not rely on fixed moving averages but instead adapts dynamically based on volatility expansion and momentum detection.
ATR-based filtering adjusts the indicator’s sensitivity to real-time conditions.
Multi-Factor Confirmation (Feature Engineering Equivalent in ML):
Combines ROC, RSI, and ATR in a structured way, similar to how ML models use multiple inputs to filter and classify data.
Implements conditional trend recognition, ensuring that only valid signals pass through the filter.
Noise Reduction with Data Smoothing:
The algorithm avoids false signals by incorporating trend intensity thresholds, much like how ML models remove outliers to refine predictions.
Adaptive filtering ensures that low-volatility environments do not produce misleading signals.
Why Use This Indicator?
✔ Reduces False Signals: Multi-factor validation ensures only high-confidence signals are triggered.
✔ Works in All Market Conditions: Volatility-adaptive nature allows the indicator to perform well in both trending and ranging markets.
✔ Great for Swing & Intraday Trading: It helps spot momentum shifts early and allows traders to catch major market moves before they fully develop.
✔ Visually Intuitive: Color-coded trends and clear signal markers make it easy to interpret.
Price Imbalance as Consecutive Levels of AveragesOverview
The Price Imbalance as Consecutive Levels of Averages indicator is an advanced technical analysis tool designed to identify and visualize price imbalances in financial markets. Unlike traditional moving average (MA) indicators that update continuously with each new price bar, this indicator employs moving averages calculated over consecutive, non-overlapping historical windows. This unique approach leverages comparative historical data to provide deeper insights into trend strength and potential reversals, offering traders a more nuanced understanding of market dynamics and reducing the likelihood of false signals or fakeouts.
Key Features
Consecutive Rolling Moving Averages: Utilizes three distinct simple moving averages (SMAs) calculated over consecutive, non-overlapping windows to capture different historical segments of price data.
Dynamic Color-Coded Visualization: SMA lines change color and style based on the relationship between the averages, highlighting both extreme and normal market conditions.
Median and Secondary Median Lines: Provides additional layers of price distribution insight during normal trend conditions through the plotting of primary and secondary median lines.
Fakeout Prevention: Filters out short-term volatility and sharp price movements by requiring consistent historical alignment of multiple moving averages.
Customizable Parameters: Offers flexibility to adjust SMA window lengths and line extensions to align with various trading strategies and timeframes.
Real-Time Updates with Historical Context: Continuously recalculates and updates SMA lines based on comparative historical windows, ensuring that the indicator reflects both current and past market conditions.
Inputs & Settings
Rolling Window Lengths:
Window 1 Length (Most Recent) Bars: Number of bars used to calculate the most recent SMA. (Default: 5, Range: 2–300)
Window 2 Length (Preceding) Bars: Number of bars for the second SMA, shifted by Window 1. (Default: 8, Range: 2–300)
Window 3 Length (Third Rolling) Bars: Number of bars for the third SMA, shifted by the combined lengths of Window 1 and Window 2. (Default: 13, Range: 2–300)
Horizontal Line Extension:
Horizontal Line Extension (Bars): Determines how far each SMA line extends horizontally on the chart. (Default: 10 bars, Range: 1–100)
Functionality and Theory
1. Calculating Consecutive Simple Moving Averages (SMAs):
The indicator calculates three SMAs, each based on distinct and consecutive historical windows of price data. This approach contrasts with traditional MAs that continuously update with each new price bar, offering a static view of past trends rather than an ongoing one.
Mean1 (SMA1): Calculated over the most recent Window 1 Length bars. Represents the short-term trend.
Mean1=∑i=1N1CloseiN1
Mean1=N1∑i=1N1Closei
Where N1N1 is the length of Window 1.
Mean2 (SMA2): Calculated over the preceding Window 2 Length bars, shifted back by Window 1 Length bars. Represents the medium-term trend.
\text{Mean2} = \frac{\sum_{i=1}^{N_2} \text{Close}_{i + N_1}}}{N_2}
Where N2N2 is the length of Window 2.
Mean3 (SMA3): Calculated over the third rolling Window 3 Length bars, shifted back by the combined lengths of Window 1 and Window 2 bars. Represents the long-term trend.
\text{Mean3} = \frac{\sum_{i=1}^{N_3} \text{Close}_{i + N_1 + N_2}}}{N_3}
Where N3N3 is the length of Window 3.
2. Determining Market Conditions:
The relationship between the three SMAs categorizes the market condition into either extreme or normal states, enabling traders to quickly assess trend strength and potential reversals.
Extreme Bullish:
Mean3Mean2>Mean1
Mean3>Mean2>Mean1
Indicates a strong and sustained downward trend. SMA lines are colored purple and styled as dashed lines.
Normal Bullish:
Mean1>Mean2andnot in extreme bullish condition
Mean1>Mean2andnot in extreme bullish condition
Indicates a standard upward trend. SMA lines are colored green and styled as solid lines.
Normal Bearish:
Mean1Mean2>Mean1
Mean3>Mean2>Mean1
Normal Bullish:
Mean1>Mean2andnot in Extreme Bullish
Mean1>Mean2andnot in Extreme Bullish
Normal Bearish:
Mean1 Mean2 > Mean3
Visualization: All three SMAs are displayed as gold dashed lines.
Median Lines: Not displayed to maintain chart clarity.
Interpretation: Indicates a strong and sustained upward trend. Traders may consider entering long positions, confident in the trend's strength without the distraction of additional lines.
2. Normal Bullish Condition:
SMAs Alignment: Mean1 > Mean2 (not in extreme condition)
Visualization: Mean1 and Mean2 are green solid lines; Mean3 is gray.
Median Lines: A thin blue dotted median line is plotted between Mean1 and Mean2, with two additional thin blue dashed lines as secondary medians.
Interpretation: Confirms an upward trend while providing deeper insights into price distribution. Traders can use the median and secondary median lines to identify optimal entry points and manage risk more effectively.
3. Extreme Bearish Condition:
SMAs Alignment: Mean3 > Mean2 > Mean1
Visualization: All three SMAs are displayed as purple dashed lines.
Median Lines: Not displayed to maintain chart clarity.
Interpretation: Indicates a strong and sustained downward trend. Traders may consider entering short positions, confident in the trend's strength without the distraction of additional lines.
4. Normal Bearish Condition:
SMAs Alignment: Mean1 < Mean2 (not in extreme condition)
Visualization: Mean1 and Mean2 are red solid lines; Mean3 is gray.
Median Lines: A thin blue dotted median line is plotted between Mean1 and Mean2, with two additional thin blue dashed lines as secondary medians.
Interpretation: Confirms a downward trend while providing deeper insights into price distribution. Traders can use the median and secondary median lines to identify optimal entry points and manage risk more effectively.
Customization and Flexibility
The Price Imbalance as Consecutive Levels of Averages indicator is highly adaptable, allowing traders to tailor it to their specific trading styles and market conditions through adjustable parameters:
SMA Window Lengths: Modify the lengths of Window 1, Window 2, and Window 3 to capture different historical trend segments, whether focusing on short-term fluctuations or long-term movements.
Line Extension: Adjust the horizontal extension of SMA and median lines to align with different trading horizons and chart preferences.
Color and Style Preferences: While default colors and styles are optimized for clarity, traders can customize these elements to match their personal chart aesthetics and enhance visual differentiation.
This flexibility ensures that the indicator remains versatile and applicable across various markets, asset classes, and trading strategies, providing valuable insights tailored to individual trading needs.
Conclusion
The Price Imbalance as Consecutive Levels of Averages indicator offers a comprehensive and innovative approach to analyzing price trends and imbalances within financial markets. By utilizing three consecutive, non-overlapping SMAs and incorporating median lines during normal trend conditions, the indicator provides clear and actionable insights into trend strength and price distribution. Its unique design leverages comparative historical data, distinguishing it from traditional moving averages and enhancing its utility in identifying genuine market movements while minimizing false signals. This dynamic and customizable tool empowers traders to refine their technical analysis, optimize their trading strategies, and navigate the markets with greater confidence and precision.
MA Crossover with Demand/Supply Zones + Stop Loss/Take ProfitStop Loss and Take Profit Inputs:
Added stopLossPerc and takeProfitPerc as inputs to allow the user to define the stop loss and take profit levels as a percentage of the entry price.
Stop Loss and Take Profit Calculation:
For long positions, the stop loss is calculated as strategy.position_avg_price * (1 - stopLossPerc), and the take profit is calculated as strategy.position_avg_price * (1 + takeProfitPerc).
For short positions, the stop loss is calculated as strategy.position_avg_price * (1 + stopLossPerc), and the take profit is calculated as strategy.position_avg_price * (1 - takeProfitPerc).
Exit Strategy:
Added strategy.exit to define the stop loss and take profit levels for each trade. The from_entry parameter ensures that the exit is tied to the specific entry order.
Flexibility:
The stop loss and take profit levels are dynamic and adjust based on the entry price of the trade.
How It Works:
When a buy signal is generated (MA crossover near a demand zone), the strategy enters a long position and sets a stop loss and take profit level based on the input percentages.
When a sell signal is generated (MA crossunder near a supply zone), the strategy enters a short position and sets a stop loss and take profit level based on the input percentages.
The trade will exit automatically if either the stop loss or take profit level is hit.
Example:
If the entry price for a long position is $100, and the stop loss is set to 1% while the take profit is set to 2%:
Stop loss level =
100
∗
(
1
−
0.01
)
=
100∗(1−0.01)=99
Take profit level =
100
∗
(
1
+
0.02
)
=
100∗(1+0.02)=102
Notes:
You can adjust the stopLossPerc and takeProfitPerc inputs to suit your risk management preferences.
Always backtest the strategy to ensure the stop loss and take profit levels are appropriate for your trading instrument and timeframe.