Premarket Gap MomoTrader(SC)🚀 Pre-Market Momentum Trader | Dynamic Position Sizing 🔥
📈 Trade explosive pre-market breakouts with confidence! This algorithmic strategy automatically detects high-momentum setups, dynamically adjusts position size, and ensures risk control with a one-trade-per-day rule.
⸻
🎯 Key Features
✅ Pre-Market Trading (4:00 - 9:30 AM EST) – Only trades during the most volatile session for early breakouts.
✅ Dynamic Position Sizing – Adapts trade size based on candle strength:
• ≥90% body → 100% position
• ≥85% body → 50% position
• ≥75% body → 25% position
✅ 1 Trade Per Day – Avoids overtrading by allowing only one high-quality trade daily.
✅ Momentum Protection – Stays in the trade as long as:
• Every candle remains green (no red candles).
• Each new candle has increasing volume (confirming strong buying).
✅ Automated Exit – Closes position if:
• A red candle appears.
• Volume fails to increase on a green candle.
⸻
🔍 How It Works
📌 Entry Conditions:
✔️ Candle gains ≥5% from previous close.
✔️ Candle is green & body size ≥75% of total range.
✔️ Volume >15K (confirming liquidity).
✔️ Occurs within pre-market session (4:00 - 9:30 AM EST).
✔️ Only the first valid trade of the day is taken.
📌 Exit Conditions:
❌ First red candle after entry → Exit trade.
❌ First green candle with lower volume → Exit trade.
⸻
🏆 Why Use This?
🔹 Eliminates Fake Breakouts – No trade unless volume & momentum confirm.
🔹 Prevents Overtrading – Restricts to one quality trade per day.
🔹 Adaptable to Any Market – Works on stocks, crypto, or forex.
🔹 Hands-Free Execution – No manual chart watching required!
⸻
🚨 Important Notes
📢 Not financial advice. Trading involves risk—always backtest & practice on paper trading before using real money.
📢 Enable pre-market data in your TradingView settings for accurate results.
📢 Optimized for 1-minute & 5-minute timeframes.
🔔 Like this strategy? Leave a comment, share your results, and don’t forget to hit Follow for more strategies! 🚀🔥
Indicadores e estratégias
PVSRA v5Overview of the PVSRA Strategy
This strategy is designed to detect and capitalize on volume-driven threshold breaches in price candles. It operates on the premise that when a high-volume candle breaks a critical price threshold, not all orders are filled within that candle’s range. This creates an imbalance—similar to a physical system being perturbed—causing the price to revert toward the level where the breach occurred to “absorb” the residual orders.
Key Features and Their Theoretical Underpinnings
Dynamic Volume Analysis and Threshold Detection
Volume Surges as Market Perturbations:
The script computes a moving average of volume over a short window and flags moments when the current volume significantly exceeds this average. These surges act as a perturbation—injecting “energy” into the market.
Adaptive Abnormal Volume Threshold:
By calculating a dynamic abnormal threshold using a daily volume average (via an 89-period VWMA) and standard deviation, the strategy identifies when the current volume is abnormally high. This mechanism mirrors the idea that when a system is disturbed (here, by a volume surge), it naturally seeks to return to equilibrium.
Candle Coloring and Visual Signal Identification
Differentiation of Candle Types:
The script distinguishes between bullish (green) and bearish (red) candles. It applies different colors based on the strength of the volume signal, providing a clear, visual representation of whether a candle is likely to trigger a price reversion.
Implication of Unfilled Orders:
A red (bearish) candle with high volume implies that sell pressure has pushed the price past a critical threshold—yet not all buy orders have been fulfilled. Conversely, a green (bullish) candle indicates that aggressive buying has left pending sell orders. In both cases, the market is expected to reverse toward the breach point to restore balance.
Trade Execution Logic: Normal and Reversal Trades
Normal Trades:
When a high-volume candle breaches a threshold and meets the directional conditions (e.g., a red candle paired with price above a daily upper band), the strategy enters a trade anticipating a reversion. The underlying idea is that the market will move back to the level where the threshold was crossed—clearing the residual orders in a manner analogous to a system following the path of least resistance.
Reversal Trades:
The strategy also monitors for clusters of consecutive signals within a short lookback period. When multiple signals accumulate, it interprets this as the market having overextended and, in a corrective move, reverses the typical trade direction. This inversion captures the market’s natural tendency to “correct” itself by moving in discrete, quantized steps—each step representing the absorption of a minimum quantum of order imbalance.
Risk and Trade Management
Stop Loss and Take Profit Buffers:
Both normal and reversal trades include predetermined buffers for stop loss and take profit levels. This systematic risk management approach is designed to capture the anticipated reversion while minimizing potential losses, aligning with the idea that market corrections follow the most energy-efficient path back to equilibrium.
Symbol Flexibility:
An option to override the chart’s symbol allows the strategy to be applied consistently across different markets, ensuring that the volume and price dynamics are analyzed uniformly.
Conceptual Bridge: From Market Dynamics to Trade Execution
At its core, the strategy treats market price movements much like a physical system that seeks to minimize “transactional energy” or inefficiency. When a price candle breaches a key threshold on high volume, it mimics an injection of energy into the system. The subsequent price reversion is the market’s natural response—moving in the most efficient path back to balance. This perspective is akin to the principle of least action, where the system evolves along the trajectory that minimizes cumulative imbalance, and it acknowledges that these corrections occur in discrete steps reflective of quantized order execution.
This unified framework allows the PVSRA strategy to not only identify when significant volume-based threshold breaches occur but also to systematically execute trades that benefit from the expected corrective moves.
TheRookAlgoPROThe Rook Algo PRO is an automated strategy that uses ICT dealing ranges to get in sync with potential market trends. It detects the market sentiment and then place a sell or a buy trade in premium/discount or in breakouts with the desired risk management.
Why is useful?
This algorithm is designed to help traders to quickly identify the current state of the market and easily back test their strategy over longs periods of time and different markets its ideal for traders that want to profit on potential expansions and want to avoid consolidations this algo will tell you when the expansion is likely to begin and when is just consolidating and failing moves to avoid trading.
How it works and how it does it?
The Algo detects the current and previous market structure to identify current ranges and ICT dealing ranges that are created when the market takes buyside liquidity and sellside liquidity, it will tell if the market is in a consolidation, expansion, retracement or in a potential turtle soup environment, it will tell if the range is small or big compared to the previous one. Is important to use it in a trending markets because when is ranging the signals lose effectiveness.
This algo is similar to the previously released the Rook algo with the additional features that is an automated strategy that can take trades using filters with the desired risk reward and different entry types and trade management options.
Also this version plots FVGS(fair value gaps) during expansions, and detects consolidations with a box and the mid point or average. Some bars colors are available to help in the identification of the market state. It has the option to show colors of the dealing ranges first detected state.
How to use it?
Start selecting the desired type of entry you want to trade, you can choose to take Discount longs, premium sells, breakouts longs and sells, this first four options are the selected by default. You can enable riskier options like trades without confirmation in premium and discount or turtle soup of the current or previous dealing range. This last ones are ideal for traders looking to enter on a counter trend but has to be used with caution with a higher timeframe reference.
In the picture below we can see a premium sell signal configuration followed by a discount buy signal It display the stop break even level and take profit.
This next image show how the riskier entries work. Because we are not waiting for a confirmation and entering on a counter trend is normal to experience some stop losses because the stop is very tight. Should only be used with a clear Higher timeframe reference as support of the trade idea. This algo has the option to enable standard deviations from the normal stop point to prevent liquidity sweeps. The purple or blue arrows indicate when we are in a potential turtle soup environment.
The algo have a feature called auto-trade enable by default that allow for a reversal of the current trade in case it meets the criteria. And also can take all possible buys or all possible sells that are riskier entries if you just want to see the market sentiment. This is useful when the market is very volatile but is moving not just ranging.
Then we configure the desired trade filters. We have the options to trade only when dealing ranges are in sync for a more secure trend, or we can disable it to take riskier trades like turtle soup trades. We can chose the minimum risk reward to take the trade and the target extension from the current range and the exit type can be when we hit the level or in a retracement that is the default setting. These setting are the most important that determine profitability of the strategy, they has be adjusted depending on the timeframe and market we are trading.
The stop and target levels can also be configured with standard deviations from the current range that way can be adapted to the market volatility.
The Algo allow the user to chose if it want to place break even, or trail the stop. In the picture below we can see it in action. This can work when the trend is very strong if not can lead to multiple reentries or loses.
The last option we can configure is the time where the trades are going to be taken, if we trade usually in the morning then we can just add the morning time by default is set to the morning 730am to 1330pm if you want to trade other times you should change this. Or if we want to enter on the ICT macro times can also be added in a filter. Trade taken with the macro times only enable is visible in the picture below.
Strategy Results
The results are obtained using 2000usd in the MNQ! In the 15minutes timeframe 1 contract per trade. Commission are set to 2USD, slippage to 1tick, the backtesting range is from May 2 2024 to March 2025 for a total of 119 trades, this Strategy default settings are designed to take trades on the daily expansions, trail stop and Break even is activated the exit on profit is on a retracement, and for loses when the stop is hit. The auto-trade option is enable to allow to detect quickly market changes. The strategy give realistic results, makes around 200% of the account in around a year. 1.4 profit factor with around 37% profitable trades. These results can be further improve and adapted to the specific style of trading using the filters.
Remember entries constitute only a small component of a complete winning strategy. Other factors like risk management, position-sizing, trading frequency, trading fees, and many others must also be properly managed to achieve profitability. Past performance doesn’t guarantee future results.
Summary of features
-Easily Identify the current dealing range and market state to avoid consolidations
-Recognize expansions with FVGs and consolidation with shaded boxes
-Recognize turtle soups scenarios to avoid fake out breakout
-Configurable automated trades in premium/discount or breakouts
-Auto-trade option that allow for reversal of the current trade when is no longer valid
-Time filter to allow only entries around the times you trade or on the macro times.
-Risk Reward filter to take the automated trades with visible stop and take profit levels
-Customizable trade management take profit, stop, breakeven level with standard deviations
-Trail stop option to secure profit when price move in your favor
-Option to exit on a close, retracement or reversal after hitting the take profit level
-Option to exit on a close or reversal after hitting stop loss
-Dashboard with instant statistics about the strategy current settings and market sentiment
RSI + Stochastic + WMA StrategyThis script is designed for TradingView and serves as a trading strategy (not just a visual indicator). It's intended for backtesting, strategy optimization, or live trading signal generation using a combination of popular technical indicators.
📊 Indicators Used in the Strategy:
Indicator Description
RSI (Relative Strength Index) Measures momentum; identifies overbought (>70) or oversold (<30) conditions.
Stochastic Oscillator (%K & %D) Detects momentum reversal points via crossovers. Useful for timing entries.
WMA (Weighted Moving Average) Identifies the trend direction (used as a trend filter).
📈 Trading Logic / Strategy Rules:
📌 Long Entry Condition (Buy Signal):
All 3 conditions must be true:
RSI is Oversold → RSI < 30
Stochastic Crossover Upward → %K crosses above %D
Price is above WMA → Confirms uptrend direction
👉 Interpretation: Market was oversold, momentum is turning up, and price confirms uptrend — bullish entry.
📌 Short Entry Condition (Sell Signal):
All 3 conditions must be true:
RSI is Overbought → RSI > 70
Stochastic Crossover Downward → %K crosses below %D
Price is below WMA → Confirms downtrend direction
👉 Interpretation: Market is overbought, momentum is turning down, and price confirms downtrend — bearish entry.
🔄 Strategy Execution (Backtesting Logic):
The script uses:
pinescript
Copy
Edit
strategy.entry("LONG", strategy.long)
strategy.entry("SHORT", strategy.short)
These are Pine Script functions to place buy and sell orders automatically when the above conditions are met. This allows you to:
Backtest the strategy
Measure win/loss ratio, drawdown, and profitability
Optimize indicator settings using TradingView Strategy Tester
📊 Visual Aids (Charts):
Plots WMA Line: Orange line for trend direction
Overbought/Oversold Zones: Horizontal lines at 70 (red) and 30 (green) for RSI visualization
⚡ Strategy Type Summary:
Category Setting
Strategy Type Momentum Reversal + Trend Filter
Timeframe Flexible (Works best on 1H, 4H, Daily)
Trading Style Swing/Intraday
Risk Profile Medium to High (due to momentum triggers)
Uses Leverage Possible (adjust risk accordingly)
Bull Flag (9:30-12:00 Only) [One-Liner Fix]🚀 Bull Flag Breakout Strategy | Intraday Momentum (9:30-12:00) 🔥📈
💡 Designed for Intraday Traders who love momentum breakouts and want to automate Bull Flag setups with volume confirmation! This strategy detects strong bullish moves, measures pullbacks, and triggers trades when the first candle makes a new high—ensuring maximum momentum.
⸻
🏆 Why This Strategy?
✅ Bull Flag Pattern Automation – No need to manually spot pullbacks! 🎯
✅ Smart Volume Confirmation – Only enter trades when breakout volume is strong! 📊
✅ Morning Session Focused (9:30 - 12:00 EST) – Trade when momentum is at its peak! ⏰
✅ Customizable ATR & Risk Settings – Adjust pullback %, stop-loss, and take-profit! 🛠️
✅ Backtest-Friendly – See how the strategy performs over time! 🔍
⸻
🎯 How It Works
📌 Step 1: Detects a Bullish Impulse Bar
🔹 Large green candle 🚀
🔹 Candle range > ATR multiplier
🔹 Volume > Average volume threshold
📌 Step 2: Confirms a Valid Pullback
🔸 Pullback must stay within % range of the impulse move 📉
🔸 If the pullback is too deep or takes too long, the setup is ignored ⛔
📌 Step 3: First Candle to Make a New High 📈
🔹 When a candle breaks the previous high and volume confirms, go long! 💰
🔹 Stop-Loss set at pullback low
🔹 Take-Profit at Risk:Reward (R:R) Target 🎯
⸻
🔥 Best For
💎 Scalpers & Day Traders – Capture short-term breakout momentum! ⚡
📊 Backtesters – Optimize ATR, volume, and pullback rules for best performance! 🧪
⏳ Morning Momentum Traders – Focus on 9:30-12:00 AM EST for higher probability setups!
⸻
🚨 Important Notes
🔹 This strategy is not financial advice! 📜
🔹 Always backtest & paper trade before using real money! 📉📈
🔹 Volatility varies – Customize settings based on your trading style! 🔧
🚀 Like this script? Give it a try & let us know how it works for you! 🔥👊
⸻
Volume Block Order AnalyzerCore Concept
The Volume Block Order Analyzer is a sophisticated Pine Script strategy designed to detect and analyze institutional money flow through large block trades. It identifies unusually high volume candles and evaluates their directional bias to provide clear visual signals of potential market movements.
How It Works: The Mathematical Model
1. Volume Anomaly Detection
The strategy first identifies "block trades" using a statistical approach:
```
avgVolume = ta.sma(volume, lookbackPeriod)
isHighVolume = volume > avgVolume * volumeThreshold
```
This means a candle must have volume exceeding the recent average by a user-defined multiplier (default 2.0x) to be considered a significant block trade.
2. Directional Impact Calculation
For each block trade identified, its price action determines direction:
- Bullish candle (close > open): Positive impact
- Bearish candle (close < open): Negative impact
The magnitude of impact is proportional to the volume size:
```
volumeWeight = volume / avgVolume // How many times larger than average
blockImpact = (isBullish ? 1.0 : -1.0) * (volumeWeight / 10)
```
This creates a normalized impact score typically ranging from -1.0 to 1.0, scaled by dividing by 10 to prevent excessive values.
3. Cumulative Impact with Time Decay
The key innovation is the cumulative impact calculation with decay:
```
cumulativeImpact := cumulativeImpact * impactDecay + blockImpact
```
This mathematical model has important properties:
- Recent block trades have stronger influence than older ones
- Impact gradually "fades" at rate determined by decay factor (default 0.95)
- Sustained directional pressure accumulates over time
- Opposing pressure gradually counteracts previous momentum
Trading Logic
Signal Generation
The strategy generates trading signals based on momentum shifts in institutional order flow:
1. Long Entry Signal: When cumulative impact crosses from negative to positive
```
if ta.crossover(cumulativeImpact, 0)
strategy.entry("Long", strategy.long)
```
*Logic: Institutional buying pressure has overcome selling pressure, indicating potential upward movement*
2. Short Entry Signal: When cumulative impact crosses from positive to negative
```
if ta.crossunder(cumulativeImpact, 0)
strategy.entry("Short", strategy.short)
```
*Logic: Institutional selling pressure has overcome buying pressure, indicating potential downward movement*
3. Exit Logic: Positions are closed when the cumulative impact moves against the position
```
if cumulativeImpact < 0
strategy.close("Long")
```
*Logic: The original signal is no longer valid as institutional flow has reversed*
Visual Interpretation System
The strategy employs multiple visualization techniques:
1. Color Gradient Bar System:
- Deep green: Strong buying pressure (impact > 0.5)
- Light green: Moderate buying pressure (0.1 < impact ≤ 0.5)
- Yellow-green: Mild buying pressure (0 < impact ≤ 0.1)
- Yellow: Neutral (impact = 0)
- Yellow-orange: Mild selling pressure (-0.1 < impact ≤ 0)
- Orange: Moderate selling pressure (-0.5 < impact ≤ -0.1)
- Red: Strong selling pressure (impact ≤ -0.5)
2. Dynamic Impact Line:
- Plots the cumulative impact as a line
- Line color shifts with impact value
- Line movement shows momentum and trend strength
3. Block Trade Labels:
- Marks significant block trades directly on the chart
- Shows direction and volume amount
- Helps identify key moments of institutional activity
4. Information Dashboard:
- Current impact value and signal direction
- Average volume benchmark
- Count of significant block trades
- Min/Max impact range
Benefits and Use Cases
This strategy provides several advantages:
1. Institutional Flow Detection: Identifies where large players are positioning themselves
2. Early Trend Identification: Often detects institutional accumulation/distribution before major price movements
3. Market Context Enhancement: Provides deeper insight than simple price action alone
4. Objective Decision Framework: Quantifies what might otherwise be subjective observations
5. Adaptive to Market Conditions: Works across different timeframes and instruments by using relative volume rather than absolute thresholds
Customization Options
The strategy allows users to fine-tune its behavior:
- Volume Threshold: How unusual a volume spike must be to qualify
- Lookback Period: How far back to measure average volume
- Impact Decay Factor: How quickly older trades lose influence
- Visual Settings: Labels and line width customization
This sophisticated yet intuitive strategy provides traders with a window into institutional activity, helping identify potential trend changes before they become obvious in price action alone.
Advanced Adaptive Grid Trading StrategyThis strategy employs an advanced grid trading approach that dynamically adapts to market conditions, including trend, volatility, and risk management considerations. The strategy aims to capitalize on price fluctuations in both rising (long) and falling (short) markets, as well as during sideways movements. It combines multiple indicators to determine the trend and automatically adjusts grid parameters for more efficient trading.
How it Works:
Trend Analysis:
Short, long, and super long Moving Averages (MA) to determine the trend direction.
RSI (Relative Strength Index) to identify overbought and oversold levels, and to confirm the trend.
MACD (Moving Average Convergence Divergence) to confirm momentum and trend direction.
Momentum indicator.
The strategy uses a weighted scoring system to assess trend strength (strong bullish, moderate bullish, strong bearish, moderate bearish, sideways).
Grid System:
The grid size (the distance between buy and sell levels) changes dynamically based on market volatility, using the ATR (Average True Range) indicator.
Grid density also adapts to the trend: in a strong trend, the grid is denser in the direction of the trend.
Grid levels are shifted depending on the trend direction (upwards in a bear market, downwards in a bull market).
Trading Logic:
The strategy opens long positions if the trend is bullish and the price reaches one of the lower grid levels.
It opens short positions if the trend is bearish and the price reaches one of the upper grid levels.
In a sideways market, it can open positions in both directions.
Risk Management:
Stop Loss for every position.
Take Profit for every position.
Trailing Stop Loss to protect profits.
Maximum daily loss limit.
Maximum number of positions limit.
Time-based exit (if the position is open for too long).
Risk-based position sizing (optional).
Input Options:
The strategy offers numerous settings that allow users to customize its operation:
Timeframe: The chart's timeframe (e.g., 1 minute, 5 minutes, 1 hour, 4 hours, 1 day, 1 week).
Base Grid Size (%): The base size of the grid, expressed as a percentage.
Max Positions: The maximum number of open positions allowed.
Use Volatility Grid: If enabled, the grid size changes dynamically based on the ATR indicator.
ATR Length: The period of the ATR indicator.
ATR Multiplier: The multiplier for the ATR to fine-tune the grid size.
RSI Length: The period of the RSI indicator.
RSI Overbought: The overbought level for the RSI.
RSI Oversold: The oversold level for the RSI.
Short MA Length: The period of the short moving average.
Long MA Length: The period of the long moving average.
Super Long MA Length: The period of the super long moving average.
MACD Fast Length: The fast period of the MACD.
MACD Slow Length: The slow period of the MACD.
MACD Signal Length: The period of the MACD signal line.
Stop Loss (%): The stop loss level, expressed as a percentage.
Take Profit (%): The take profit level, expressed as a percentage.
Use Trailing Stop: If enabled, the strategy uses a trailing stop loss.
Trailing Stop (%): The trailing stop loss level, expressed as a percentage.
Max Loss Per Day (%): The maximum daily loss, expressed as a percentage.
Time Based Exit: If enabled, the strategy exits the position after a certain amount of time.
Max Holding Period (hours): The maximum holding time in hours.
Use Risk Based Position: If enabled, the strategy calculates position size based on risk.
Risk Per Trade (%): The risk per trade, expressed as a percentage.
Max Leverage: The maximum leverage.
Important Notes:
This strategy does not guarantee profits. Cryptocurrency markets are volatile, and trading involves risk.
The strategy's effectiveness depends on market conditions and settings.
It is recommended to thoroughly backtest the strategy under various market conditions before using it live.
Past performance is not indicative of future results.
Multi-Timeframe MACD Strategy ver 1.0Multi-Timeframe MACD Strategy: Enhanced Trend Trading with Customizable Entry and Trailing Stop
This strategy utilizes the Moving Average Convergence Divergence (MACD) indicator across multiple timeframes to identify strong trends, generate precise entry and exit signals, and manage risk with an optional trailing stop loss. By combining the insights of both the current chart's timeframe and a user-defined higher timeframe, this strategy aims to improve trade accuracy, reduce exposure to false signals, and capture larger market moves.
Key Features:
Dual Timeframe Analysis: Calculates and analyzes the MACD on both the current chart's timeframe and a user-selected higher timeframe (e.g., Daily MACD on a 1-hour chart). This provides a broader market context, helping to confirm trends and filter out short-term noise.
Configurable MACD: Fine-tune the MACD calculation with adjustable Fast Length, Slow Length, and Signal Length parameters. Optimize the indicator's sensitivity to match your trading style and the volatility of the asset.
Flexible Entry Options: Choose between three distinct entry types:
Crossover: Enters trades when the MACD line crosses above (long) or below (short) the Signal line.
Zero Cross: Enters trades when the MACD line crosses above (long) or below (short) the zero line.
Both: Combines both Crossover and Zero Cross signals, providing more potential entry opportunities.
Independent Timeframe Control: Display and trade based on the current timeframe MACD, the higher timeframe MACD, or both. This allows you to focus on the information most relevant to your analysis.
Optional Trailing Stop Loss: Implements a configurable trailing stop loss to protect profits and limit potential losses. The trailing stop is adjusted dynamically as the price moves in your favor, based on a user-defined percentage.
No Repainting: Employs lookahead=barmerge.lookahead_off in the request.security() function to prevent data leakage and ensure accurate backtesting and real-time signals.
Clear Visual Signals (Optional): Includes optional plotting of the MACD and Signal lines for both timeframes, with distinct colors for easy visual identification. These plots are for visual confirmation and are not required for the strategy's logic.
Suitable for Various Trading Styles: Adaptable to swing trading, day trading, and trend-following strategies across diverse markets (stocks, forex, cryptocurrencies, etc.).
Fully Customizable: All parameters are adjustable, including timeframes, MACD Settings, Entry signal type and trailing stop settings.
How it Works:
MACD Calculation: The strategy calculates the MACD (using the standard formula) for both the current chart's timeframe and the specified higher timeframe.
Trend Identification: The relationship between the MACD line, Signal line, and zero line is used to determine the current trend for each timeframe.
Entry Signals: Buy/sell signals are generated based on the selected "Entry Type":
Crossover: A long signal is generated when the MACD line crosses above the Signal line, and both timeframes are in agreement (if both are enabled). A short signal is generated when the MACD line crosses below the Signal line, and both timeframes are in agreement.
Zero Cross: A long signal is generated when the MACD line crosses above the zero line, and both timeframes agree. A short signal is generated when the MACD line crosses below the zero line and both timeframes agree.
Both: Combines Crossover and Zero Cross signals.
Trailing Stop Loss (Optional): If enabled, a trailing stop loss is set at a specified percentage below (for long positions) or above (for short positions) the entry price. The stop-loss is automatically adjusted as the price moves favorably.
Exit Signals:
Without Trailing Stop: Positions are closed when the MACD signals reverse according to the selected "Entry Type" (e.g., a long position is closed when the MACD line crosses below the Signal line if using "Crossover" entries).
With Trailing Stop: Positions are closed if the price hits the trailing stop loss.
Backtesting and Optimization: The strategy automatically backtests on the chart's historical data, allowing you to assess its performance and optimize parameters for different assets and timeframes.
Example Use Cases:
Confirming Trend Strength: A trader on a 1-hour chart sees a bullish MACD crossover on the current timeframe. They check the MTF MACD strategy and see that the Daily MACD is also bullish, confirming the strength of the uptrend.
Filtering Noise: A trader using a 15-minute chart wants to avoid false signals from short-term volatility. They use the strategy with a 4-hour higher timeframe to filter out noise and only trade in the direction of the dominant trend.
Dynamic Risk Management: A trader enters a long position and enables the trailing stop loss. As the price rises, the trailing stop is automatically adjusted upwards, protecting profits. The trade is exited either when the MACD reverses or when the price hits the trailing stop.
Disclaimer:
The MACD is a lagging indicator and can produce false signals, especially in ranging markets. This strategy is for educational and informational purposes only and should not be considered financial advice. Backtest and optimize the strategy thoroughly, combine it with other technical analysis tools, and always implement sound risk management practices before using it with real capital. Past performance is not indicative of future results. Conduct your own due diligence and consider your risk tolerance before making any trading decisions.
Multi-Timeframe Parabolic SAR Strategy ver 1.0Multi-Timeframe Parabolic SAR Strategy (MTF PSAR) - Enhanced Trend Trading
This strategy leverages the power of the Parabolic SAR (Stop and Reverse) indicator across multiple timeframes to provide robust trend identification, precise entry/exit signals, and dynamic trailing stop management. By combining the insights of both the current chart's timeframe and a user-defined higher timeframe, this strategy aims to improve trading accuracy, reduce risk, and capture more significant market moves.
Key Features:
Dual Timeframe Analysis: Simultaneously analyzes the Parabolic SAR on the current chart and a higher timeframe (e.g., Daily PSAR on a 1-hour chart). This allows you to align your trades with the dominant trend and filter out noise from lower timeframes.
Configurable PSAR: Fine-tune the PSAR calculation with adjustable Start, Increment, and Maximum values to optimize sensitivity for your trading style and the asset's volatility.
Independent Timeframe Control: Choose to display and trade based on either or both the current timeframe PSAR and the higher timeframe PSAR. Focus on the most relevant information for your analysis.
Clear Visual Signals: Distinct colors for the current and higher timeframe PSAR dots provide a clear visual representation of potential entry and exit points.
Multiple Entry Strategies: The strategy offers flexible entry conditions, allowing you to trade based on:
Confirmation: Both current and higher timeframe PSAR signals agree and the current timeframe PSAR has just flipped direction. (Most conservative)
Current Timeframe Only: Trades based solely on the current timeframe PSAR, ideal for when the higher timeframe is less relevant or disabled.
Higher Timeframe Only: Trades based solely on the higher timeframe PSAR.
Dynamic Trailing Stop (PSAR-Based): Implements a trailing stop-loss based on the current timeframe's Parabolic SAR. This helps protect profits by automatically adjusting the stop-loss as the price moves in your favor. Exits are triggered when either the current or HTF PSAR flips.
No Repainting: Uses lookahead=barmerge.lookahead_off in the security() function to ensure that the higher timeframe data is accessed without any data leakage, preventing repainting issues.
Fully Configurable: All parameters (PSAR settings, higher timeframe, visibility, colors) are adjustable through the strategy's settings panel, allowing for extensive customization and optimization.
Suitable for Various Trading Styles: Applicable to swing trading, day trading, and trend-following strategies across various markets (stocks, forex, cryptocurrencies, etc.).
How it Works:
PSAR Calculation: The strategy calculates the standard Parabolic SAR for both the current chart's timeframe and the selected higher timeframe.
Trend Identification: The direction of the PSAR (dots below price = uptrend, dots above price = downtrend) determines the current trend for each timeframe.
Entry Signals: The strategy generates buy/sell signals based on the chosen entry strategy (Confirmation, Current Timeframe Only, or Higher Timeframe Only). The Confirmation strategy offers the highest probability signals by requiring agreement between both timeframes.
Trailing Stop Exit: Once a position is entered, the strategy uses the current timeframe PSAR as a dynamic trailing stop. The stop-loss is automatically adjusted as the PSAR dots move, helping to lock in profits and limit losses. The strategy exits when either the Current or HTF PSAR changes direction.
Backtesting and Optimization: The strategy automatically backtests on the chart's historical data, allowing you to evaluate its performance and optimize the settings for different assets and timeframes.
Example Use Cases:
Trend Confirmation: A trader on a 1-hour chart observes a bullish PSAR flip on the current timeframe. They check the MTF PSAR strategy and see that the Daily PSAR is also bullish, confirming the strength of the uptrend and providing a high-probability long entry signal.
Filtering Noise: A trader on a 5-minute chart wants to avoid whipsaws caused by short-term price fluctuations. They use the strategy with a 1-hour higher timeframe to filter out noise and only trade in the direction of the dominant trend.
Dynamic Risk Management: A trader enters a long position and uses the current timeframe PSAR as a trailing stop. As the price rises, the PSAR dots move upwards, automatically raising the stop-loss and protecting profits. The trade is exited when the current (or HTF) PSAR flips to bearish.
Disclaimer:
The Parabolic SAR is a lagging indicator and can produce false signals, particularly in ranging or choppy markets. This strategy is intended for educational and informational purposes only and should not be considered financial advice. It is essential to backtest and optimize the strategy thoroughly, use it in conjunction with other technical analysis tools, and implement sound risk management practices before using it with real capital. Past performance is not indicative of future results. Always conduct your own due diligence and consider your risk tolerance before making any trading decisions.
Rally Base Drop SND Pivots Strategy [LuxAlgo X PineIndicators]This strategy is based on the Rally Base Drop (RBD) SND Pivots indicator developed by LuxAlgo. Full credit for the concept and original indicator goes to LuxAlgo.
The Rally Base Drop SND Pivots Strategy is a non-repainting supply and demand trading system that detects pivot points based on Rally, Base, and Drop (RBD) candles. This strategy automatically identifies key market structure levels, allowing traders to:
Identify pivot-based supply and demand (SND) zones.
Use fixed criteria for trend continuation or reversals.
Filter out market noise by requiring structured price formations.
Enter trades based on breakouts of key SND pivot levels.
How the Rally Base Drop SND Pivots Strategy Works
1. Pivot Point Detection Using RBD Candles
The strategy follows a rigid market structure methodology, where pivots are detected only when:
A Rally (R) consists of multiple consecutive bullish candles.
A Drop (D) consists of multiple consecutive bearish candles.
A Base (B) is identified as a transition between Rallies and Drops, acting as a pivot point.
The pivot level is confirmed when the formation is complete.
Unlike traditional fractal-based pivots, RBD Pivots enforce stricter structural rules, ensuring that each pivot:
Has a well-defined bullish or bearish price movement.
Reduces false signals caused by single-bar fluctuations.
Provides clear supply and demand levels based on structured price movements.
These pivot levels are drawn on the chart using color-coded boxes:
Green zones represent bullish pivot levels (Rally Base formations).
Red zones represent bearish pivot levels (Drop Base formations).
Once a pivot is confirmed, the high or low of the base candle is used as the reference level for future trades.
2. Trade Entry Conditions
The strategy allows traders to select from three trading modes:
Long Only – Only takes long trades when bullish pivot breakouts occur.
Short Only – Only takes short trades when bearish pivot breakouts occur.
Long & Short – Trades in both directions based on pivot breakouts.
Trade entry signals are triggered when price breaks through a confirmed pivot level:
Long Entry:
A bullish pivot level is formed.
Price breaks above the bullish pivot level.
The strategy enters a long position.
Short Entry:
A bearish pivot level is formed.
Price breaks below the bearish pivot level.
The strategy enters a short position.
The strategy includes an optional mode to reverse long and short conditions, allowing traders to experiment with contrarian entries.
3. Exit Conditions Using ATR-Based Risk Management
This strategy uses the Average True Range (ATR) to calculate dynamic stop-loss and take-profit levels:
Stop-Loss (SL): Placed 1 ATR below entry for long trades and 1 ATR above entry for short trades.
Take-Profit (TP): Set using a Risk-Reward Ratio (RR) multiplier (default = 6x ATR).
When a trade is opened:
The entry price is recorded.
ATR is calculated at the time of entry to determine stop-loss and take-profit levels.
Trades exit automatically when either SL or TP is reached.
If reverse conditions mode is enabled, stop-loss and take-profit placements are flipped.
Visualization & Dynamic Support/Resistance Levels
1. Pivot Boxes for Market Structure
Each pivot is marked with a colored box:
Green boxes indicate bullish demand zones.
Red boxes indicate bearish supply zones.
These boxes remain on the chart to act as dynamic support and resistance levels, helping traders identify key price reaction zones.
2. Horizontal Entry, Stop-Loss, and Take-Profit Lines
When a trade is active, the strategy plots:
White line → Entry price.
Red line → Stop-loss level.
Green line → Take-profit level.
Labels display the exact entry, SL, and TP values, updating dynamically as price moves.
Customization Options
This strategy offers multiple adjustable settings to optimize performance for different market conditions:
Trade Mode Selection → Choose between Long Only, Short Only, or Long & Short.
Pivot Length → Defines the number of required Rally & Drop candles for a pivot.
ATR Exit Multiplier → Adjusts stop-loss distance based on ATR.
Risk-Reward Ratio (RR) → Modifies take-profit level relative to risk.
Historical Lookback → Limits how far back pivot zones are displayed.
Color Settings → Customize pivot box colors for bullish and bearish setups.
Considerations & Limitations
Pivot Breakouts Do Not Guarantee Reversals. Some pivot breaks may lead to continuation moves instead of trend reversals.
Not Optimized for Low Volatility Conditions. This strategy works best in trending markets with strong momentum.
ATR-Based Stop-Loss & Take-Profit May Require Optimization. Different assets may require different ATR multipliers and RR settings.
Market Noise May Still Influence Pivots. While this method filters some noise, fake breakouts can still occur.
Conclusion
The Rally Base Drop SND Pivots Strategy is a non-repainting supply and demand system that combines:
Pivot-based market structure analysis (using Rally, Base, and Drop candles).
Breakout-based trade entries at confirmed SND levels.
ATR-based dynamic risk management for stop-loss and take-profit calculation.
This strategy helps traders:
Identify high-probability supply and demand levels.
Trade based on structured market pivots.
Use a systematic approach to price action analysis.
Automatically manage risk with ATR-based exits.
The strict pivot detection rules and built-in breakout validation make this strategy ideal for traders looking to:
Trade based on market structure.
Use defined support & resistance levels.
Reduce noise compared to traditional fractals.
Implement a structured supply & demand trading model.
This strategy is fully customizable, allowing traders to adjust parameters to fit their market and trading style.
Full credit for the original concept and indicator goes to LuxAlgo.
IU BBB(Big Body Bar) StrategyDESCRIPTION
The IU BBB (Big Body Bar) Strategy is a price action-based trading strategy that identifies high-momentum candles with significantly larger body sizes compared to the average. It enters trades when a strong bullish or bearish move occurs and manages risk using an ATR-based trailing stop-loss system.
USER INPUTS:
- Big Body Threshold – Defines how many times larger the candle body should be compared to the average body ( default is 4 ).
- ATR Length – The period for the Average True Range (ATR) used in the trailing stop-loss calculation ( default is 14 ).
- ATR Factor – Multiplier for ATR to determine the trailing stop distance ( default is 2 ).
LONG CONDITION:
- The current candle’s body is greater than the average body size multiplied by the Big Body Threshold.
- The closing price is higher than the opening price (bullish candle).
SHORT CONDITION:
- The current candle’s body is greater than the average body size multiplied by the Big Body Threshold.
- The closing price is lower than the opening price (bearish candle).
LONG EXIT:
- ATR-based trailing stop-loss dynamically adjusts, locking in profits as the price moves higher.
SHORT EXIT:
- ATR-based trailing stop-loss dynamically adjusts, securing profits as the price moves lower.
WHY IT IS UNIQUE:
- Unlike traditional momentum strategies, this system adapts to volatility by filtering trades based on relative candle size.
- It incorporates an ATR-based trailing stop-loss, ensuring risk management and profit protection.
- The strategy avoids choppy market conditions by only trading when significant momentum is present.
HOW USERS CAN BENEFIT FROM IT:
- Catch Strong Price Moves – The strategy helps traders enter trades when the market shows decisive momentum.
- Effective Risk Management – The ATR-based trailing stop ensures that winning trades remain profitable.
- Works Across Markets – Can be applied to stocks, forex, crypto, and indices with proper optimization.
- Fully Customizable – Users can adjust sensitivity settings to match their trading style and time frame.
Liquidity Sweep Filter Strategy [AlgoAlpha X PineIndicators]This strategy is based on the Liquidity Sweep Filter developed by AlgoAlpha. Full credit for the concept and original indicator goes to AlgoAlpha.
The Liquidity Sweep Filter Strategy is a non-repainting trading system designed to identify liquidity sweeps, trend shifts, and high-impact price levels. It incorporates volume-based liquidation analysis, trend confirmation, and dynamic support/resistance detection to optimize trade entries and exits.
This strategy helps traders:
Detect liquidity sweeps where major market participants trigger stop losses and liquidations.
Identify trend shifts using a volatility-based moving average system.
Analyze volume distribution with a built-in volume profile visualization.
Filter noise by differentiating between major and minor liquidity sweeps.
How the Liquidity Sweep Filter Strategy Works
1. Trend Detection Using Volatility-Based Filtering
The strategy applies a volatility-adjusted moving average system to determine trend direction:
A central trend line is calculated using an EMA smoothed over a user-defined length.
Upper and lower deviation bands are created based on the average price deviation over multiple periods.
If price closes above the upper band, the strategy signals an uptrend.
If price closes below the lower band, the strategy signals a downtrend.
This approach ensures that trend shifts are confirmed only when price significantly moves beyond normal market fluctuations.
2. Liquidity Sweep Detection
Liquidity sweeps occur when price temporarily breaks key levels, triggering stop-loss liquidations or margin call events. The strategy tracks swing highs and lows, marking potential liquidity grabs:
Bearish Liquidity Sweeps – Price breaks a recent high, then reverses downward.
Bullish Liquidity Sweeps – Price breaks a recent low, then reverses upward.
Volume Integration – The strategy analyzes trading volume at each sweep to differentiate between major and minor sweeps.
Key levels where liquidity sweeps occur are plotted as color-coded horizontal lines:
Red lines indicate bearish liquidity sweeps.
Green lines indicate bullish liquidity sweeps.
Labels are displayed at each sweep, showing the volume of liquidated positions at that level.
3. Volume Profile Analysis
The strategy includes an optional volume profile visualization, displaying how trading volume is distributed across different price levels.
Features of the volume profile:
Point of Control (POC) – The price level with the highest traded volume is marked as a key area of interest.
Bounding Box – The profile is enclosed within a transparent box, helping traders visualize the price range of high trading activity.
Customizable Resolution & Scale – Traders can adjust the granularity of the profile to match their preferred time frame.
The volume profile helps identify zones of strong support and resistance, making it easier to anticipate price reactions at key levels.
Trade Entry & Exit Conditions
The strategy allows traders to configure trade direction:
Long Only – Only takes long trades.
Short Only – Only takes short trades.
Long & Short – Trades in both directions.
Entry Conditions
Long Entry:
A bullish trend shift is confirmed.
A bullish liquidity sweep occurs (price sweeps below a key level and reverses).
The trade direction setting allows long trades.
Short Entry:
A bearish trend shift is confirmed.
A bearish liquidity sweep occurs (price sweeps above a key level and reverses).
The trade direction setting allows short trades.
Exit Conditions
Closing a Long Position:
A bearish trend shift occurs.
The position is liquidated at a predefined liquidity sweep level.
Closing a Short Position:
A bullish trend shift occurs.
The position is liquidated at a predefined liquidity sweep level.
Customization Options
The strategy offers multiple adjustable settings:
Trade Mode: Choose between Long Only, Short Only, or Long & Short.
Trend Calculation Length & Multiplier: Adjust how trend signals are calculated.
Liquidity Sweep Sensitivity: Customize how aggressively the strategy identifies sweeps.
Volume Profile Display: Enable or disable the volume profile visualization.
Bounding Box & Scaling: Control the size and position of the volume profile.
Color Customization: Adjust colors for bullish and bearish signals.
Considerations & Limitations
Liquidity sweeps do not always result in reversals. Some price sweeps may continue in the same direction.
Works best in volatile markets. In low-volatility environments, liquidity sweeps may be less reliable.
Trend confirmation adds a slight delay. The strategy ensures valid signals, but this may result in slightly later entries.
Large volume imbalances may distort the volume profile. Adjusting the scale settings can help improve visualization.
Conclusion
The Liquidity Sweep Filter Strategy is a volume-integrated trading system that combines liquidity sweeps, trend analysis, and volume profile data to optimize trade execution.
By identifying key price levels where liquidations occur, this strategy provides valuable insight into market behavior, helping traders make better-informed trading decisions.
Key use cases for this strategy:
Liquidity-Based Trading – Capturing moves triggered by stop hunts and liquidations.
Volume Analysis – Using volume profile data to confirm high-activity price zones.
Trend Following – Entering trades based on confirmed trend shifts.
Support & Resistance Trading – Using liquidity sweep levels as dynamic price zones.
This strategy is fully customizable, allowing traders to adapt it to different market conditions, timeframes, and risk preferences.
Full credit for the original concept and indicator goes to AlgoAlpha.
Market Trend Levels Non-Repainting [BigBeluga X PineIndicators]This strategy is based on the Market Trend Levels Detector developed by BigBeluga. Full credit for the concept and original indicator goes to BigBeluga.
The Market Trend Levels Detector Strategy is a non-repainting trend-following strategy that identifies market trend shifts using two Exponential Moving Averages (EMA). It also detects key price levels and allows traders to apply multiple filters to refine trade entries and exits.
This strategy is designed for trend trading and enables traders to:
Identify trend direction based on EMA crossovers.
Detect significant market levels using labeled trend lines.
Use multiple filter conditions to improve trade accuracy.
Avoid false signals through non-repainting calculations.
How the Market Trend Levels Detector Strategy Works
1. Core Trend Detection Using EMA Crossovers
The strategy detects trend shifts using two EMAs:
Fast EMA (default: 12 periods) – Reacts quickly to price movements.
Slow EMA (default: 25 periods) – Provides a smoother trend confirmation.
A bullish crossover (Fast EMA crosses above Slow EMA) signals an uptrend , while a bearish crossover (Fast EMA crosses below Slow EMA) signals a downtrend .
2. Market Level Detection & Visualization
Each time an EMA crossover occurs, a trend level line is drawn:
Bullish crossover → A green line is drawn at the low of the crossover candle.
Bearish crossover → A purple line is drawn at the high of the crossover candle.
Lines can be extended to act as support and resistance zones for future price action.
Additionally, a small label (●) appears at each crossover to mark the event on the chart.
3. Trade Entry & Exit Conditions
The strategy allows users to choose between three trading modes:
Long Only – Only enters long trades.
Short Only – Only enters short trades.
Long & Short – Trades in both directions.
Entry Conditions
Long Entry:
A bullish EMA crossover occurs.
The trade direction setting allows long trades.
Filter conditions (if enabled) confirm a valid long signal.
Short Entry:
A bearish EMA crossover occurs.
The trade direction setting allows short trades.
Filter conditions (if enabled) confirm a valid short signal.
Exit Conditions
Long Exit:
A bearish EMA crossover occurs.
Exit filters (if enabled) indicate an invalid long position.
Short Exit:
A bullish EMA crossover occurs.
Exit filters (if enabled) indicate an invalid short position.
Additional Trade Filters
To improve trade accuracy, the strategy allows traders to apply up to 7 additional filters:
RSI Filter: Only trades when RSI confirms a valid trend.
MACD Filter: Ensures MACD histogram supports the trade direction.
Stochastic Filter: Requires %K line to be above/below threshold values.
Bollinger Bands Filter: Confirms price position relative to the middle BB line.
ADX Filter: Ensures the trend strength is above a set threshold.
CCI Filter: Requires CCI to indicate momentum in the right direction.
Williams %R Filter: Ensures price momentum supports the trade.
Filters can be enabled or disabled individually based on trader preference.
Dynamic Level Extension Feature
The strategy provides an optional feature to extend trend lines until price interacts with them again:
Bullish support lines extend until price revisits them.
Bearish resistance lines extend until price revisits them.
If price breaks a line, the line turns into a dotted style , indicating it has been breached.
This helps traders identify key levels where trend shifts previously occurred, providing useful support and resistance insights.
Customization Options
The strategy includes several adjustable settings :
Trade Direction: Choose between Long Only, Short Only, or Long & Short.
Trend Lengths: Adjust the Fast & Slow EMA lengths.
Market Level Extension: Decide whether to extend support/resistance lines.
Filters for Trade Confirmation: Enable/disable individual filters.
Color Settings: Customize line colors for bullish and bearish trend shifts.
Maximum Displayed Lines: Limit the number of drawn support/resistance lines.
Considerations & Limitations
Trend Lag: As with any EMA-based strategy, signals may be slightly delayed compared to price action.
Sideways Markets: This strategy works best in trending conditions; frequent crossovers in sideways markets can produce false signals.
Filter Usage: Enabling multiple filters may reduce trade frequency, but can also improve trade quality.
Line Overlap: If many crossovers occur in a short period, the chart may become cluttered with multiple trend levels. Adjusting the "Display Last" setting can help.
Conclusion
The Market Trend Levels Detector Strategy is a non-repainting trend-following system that combines EMA crossovers, market level detection, and customizable filters to improve trade accuracy.
By identifying trend shifts and key price levels, this strategy can be used for:
Trend Confirmation – Using EMA crossovers and filters to confirm trend direction.
Support & Resistance Trading – Identifying dynamic levels where price reacts.
Momentum-Based Trading – Combining EMA crossovers with additional momentum filters.
This strategy is fully customizable and can be adapted to different trading styles, timeframes, and market conditions.
Full credit for the original concept and indicator goes to BigBeluga.
RSI, Volume, MACD, EMA ComboRSI + Volume + MACD + EMA Trading System
This script combines four powerful indicators—Relative Strength Index (RSI), Volume, Moving Average Convergence Divergence (MACD), and Exponential Moving Average (EMA)—to create a comprehensive trading strategy for better trend confirmation and trade entries.
How It Works
RSI (Relative Strength Index)
Helps identify overbought and oversold conditions.
Used to confirm momentum strength before taking a trade.
Volume
Confirms the strength of price movements.
Avoids false signals by ensuring there is sufficient trading activity.
MACD (Moving Average Convergence Divergence)
Confirms trend direction and momentum shifts.
Provides buy/sell signals through MACD line crossovers.
EMA (Exponential Moving Average)
Acts as a dynamic support and resistance level.
Helps filter out trades that go against the overall trend.
Trading Logic
Buy Signal:
RSI is above 50 (bullish momentum).
MACD shows a bullish crossover.
The price is above the EMA (trend confirmation).
Volume is increasing (strong participation).
Sell Signal:
RSI is below 50 (bearish momentum).
MACD shows a bearish crossover.
The price is below the EMA (downtrend confirmation).
Volume is increasing (intense selling pressure).
Backtesting & Risk Management
The strategy is optimized for scalping on the 1-minute timeframe (adjustable for other timeframes).
Default settings use realistic commission and slippage to simulate actual trading conditions.
A stop-loss and take-profit system is integrated to manage risk effectively.
This script is designed to help traders filter out false signals, improve trend confirmation, and increase trade accuracy by combining multiple indicators in a structured way.
Maxima MAX1📌 Overview:
This strategy is a Simple Moving Average (SMA) Crossover system with an optional Relative Strength Index (RSI) filter for better trade confirmation. It allows traders to customize key parameters and backtest results within a specific date range.
📊 How It Works:
✅ Entry Conditions:
The closing price must be above both the Fast SMA and Slow SMA.
(Optional) RSI must be above a threshold (default: 50) for additional confirmation.
❌ Exit Condition:
The closing price drops below the Fast SMA, signaling an exit.
🔧 Customizable Inputs:
SMA Lengths: Adjust both Fast and Slow SMA values.
RSI Filter: Enable/disable RSI confirmation with a custom length & threshold.
Backtest Date Range: Choose a start and end date for testing historical performance.
🚀 Why Use This Strategy?
✔ Ideal for trend-following traders looking for momentum-based entries.
✔ Provides an additional RSI filter to reduce false signals.
✔ Helps traders refine their strategy by testing different parameters.
📢 How to Use:
1️⃣ Customize the SMA lengths, RSI settings, and date range.
2️⃣ Enable/Disable the RSI filter as needed.
3️⃣ Analyze historical performance and optimize for different markets.
⚠ Disclaimer:
This strategy is for educational purposes only. Always backtest thoroughly before using it in live trading.
Gradient Trend Filter STRATEGY [ChartPrime/PineIndicators]This strategy is based on the Gradient Trend Filter indicator developed by ChartPrime. Full credit for the concept and indicator goes to ChartPrime.
The Gradient Trend Filter Strategy is designed to execute trades based on the trend analysis and filtering system provided by the Gradient Trend Filter indicator. It integrates a noise-filtered trend detection system with a color-gradient visualization, helping traders identify trend strength, momentum shifts, and potential reversals.
How the Gradient Trend Filter Strategy Works
1. Noise Filtering for Smoother Trends
To reduce false signals caused by market noise, the strategy applies a three-stage smoothing function to the source price. This function ensures that trend shifts are detected more accurately, minimizing unnecessary trade entries and exits.
The filter is based on an Exponential Moving Average (EMA)-style smoothing technique.
It processes price data in three successive passes, refining the trend signal before generating trade entries.
This filtering technique helps eliminate minor fluctuations and highlights the true underlying trend.
2. Multi-Layered Trend Bands & Color-Based Trend Visualization
The Gradient Trend Filter constructs multiple trend bands around the filtered trend line, acting as dynamic support and resistance zones.
The mid-line changes color based on the trend direction:
Green for uptrends
Red for downtrends
A gradient cloud is formed around the trend line, dynamically shifting colors to provide early warning signals of trend reversals.
The outer bands function as potential support and resistance, helping traders determine stop-loss and take-profit zones.
Visualization elements used in this strategy:
Trend Filter Line → Changes color between green (bullish) and red (bearish).
Trend Cloud → Dynamically adjusts color based on trend strength.
Orange Markers → Appear when a trend shift is confirmed.
Trade Entry & Exit Conditions
This strategy automatically enters trades based on confirmed trend shifts detected by the Gradient Trend Filter.
1. Trade Entry Rules
Long Entry:
A bullish trend shift is detected (trend direction changes to green).
The filtered trend value crosses above zero, confirming upward momentum.
The strategy enters a long position.
Short Entry:
A bearish trend shift is detected (trend direction changes to red).
The filtered trend value crosses below zero, confirming downward momentum.
The strategy enters a short position.
2. Trade Exit Rules
Closing a Long Position:
If a bearish trend shift occurs, the strategy closes the long position.
Closing a Short Position:
If a bullish trend shift occurs, the strategy closes the short position.
The trend shift markers (orange diamonds) act as a confirmation signal, reinforcing the validity of trade entries and exits.
Customization Options
This strategy allows traders to adjust key parameters for flexibility in different market conditions:
Trade Direction: Choose between Long Only, Short Only, or Long & Short .
Trend Length: Modify the length of the smoothing function to adapt to different timeframes.
Line Width & Colors: Customize the visual appearance of trend lines and cloud colors.
Performance Table: Enable or disable the equity performance table that tracks historical trade results.
Performance Tracking & Reporting
A built-in performance table is included to monitor monthly and yearly trading performance.
The table calculates monthly percentage returns, displaying them in a structured format.
Color-coded values highlight profitable months (blue) and losing months (red).
Tracks yearly cumulative performance to assess long-term strategy effectiveness.
Traders can use this feature to evaluate historical performance trends and optimize their strategy settings accordingly.
How to Use This Strategy
Identify Trend Strength & Reversals:
Use the trend line and cloud color changes to assess trend strength and detect potential reversals.
Monitor Momentum Shifts:
Pay attention to gradient cloud color shifts, as they often appear before the trend line changes color.
This can indicate early momentum weakening or strengthening.
Act on Trend Shift Markers:
Use orange diamonds as confirmation signals for trend shifts and trade entry/exit points.
Utilize Cloud Bands as Support/Resistance:
The outer bands of the cloud serve as dynamic support and resistance, helping with stop-loss and take-profit placement.
Considerations & Limitations
Trend Lag: Since the strategy applies a smoothing function, entries may be slightly delayed compared to raw price action.
Volatile Market Conditions: In high-volatility markets, trend shifts may occur more frequently, leading to higher trade frequency.
Optimized for Trend Trading: This strategy is best suited for trending markets and may produce false signals in sideways (ranging) conditions.
Conclusion
The Gradient Trend Filter Strategy is a trend-following system based on the Gradient Trend Filter indicator by ChartPrime. It integrates noise filtering, trend visualization, and gradient-based color shifts to help traders identify strong market trends and potential reversals.
By combining trend filtering with a multi-layered cloud system, the strategy provides clear trade signals while minimizing noise. Traders can use this strategy for long-term trend trading, momentum shifts, and support/resistance-based decision-making.
This strategy is a fully automated system that allows traders to execute long, short, or both directions, with customizable settings to adapt to different market conditions.
Credit for the original concept and indicator goes to ChartPrime.
Simple APF Strategy Backtesting [The Quant Science]Simple backtesting strategy for the quantitative indicator Autocorrelation Price Forecasting. This is a Buy & Sell strategy that operates exclusively with long orders. It opens long positions and generates profit based on the future price forecast provided by the indicator. It's particularly suitable for trend-following trading strategies or directional markets with an established trend.
Main functions
1. Cycle Detection: Utilize autocorrelation to identify repetitive market behaviors and cycles.
2. Forecasting for Backtesting: Simulate trades and assess the profitability of various strategies based on future price predictions.
Logic
The strategy works as follow:
Entry Condition: Go long if the hypothetical gain exceeds the threshold gain (configurable by user interface).
Position Management: Sets a take-profit level based on the future price.
Position Sizing: Automatically calculates the order size as a percentage of the equity.
No Stop-Loss: this strategy doesn't includes any stop loss.
Example Use Case
A trader analyzes a dayli period using 7 historical bars for autocorrelation.
Sets a threshold gain of 20 points using a 5% of the equity for each trade.
Evaluates the effectiveness of a long-only strategy in this period to assess its profitability and risk-adjusted performance.
User Interface
Length: Set the length of the data used in the autocorrelation price forecasting model.
Thresold Gain: Minimum value to be considered for opening trades based on future price forecast.
Order Size: percentage size of the equity used for each single trade.
Strategy Limit
This strategy does not use a stop loss. If the price continues to drop and the future price forecast is incorrect, the trader may incur a loss or have their capital locked in the losing trade.
Disclaimer!
This is a simple template. Use the code as a starting point rather than a finished solution. The script does not include important parameters, so use it solely for educational purposes or as a boilerplate.
GRIM309 CallPut StrategyThis draws the 5, 10, 20, 50 and 200 EMA lines.
It creates suggestions of when to open and close call positions (GREEN) as well as open and close put positions (RED) it has a early warning system, and in case there is a spike between the last 5 positions it will signal close the position, this is optional (isWarning)
There is also a cooldown period, when set at 2 it means wait a position before initiating another, I did not like the position closing and then opening directly afterwards, you could cooldown for 3 and skip 2 candles or more etc. Set to 1 then it will open/close without cooling down.
Additionally the very bottom shows wether it is in an uptrend or downtrend currently (Yellow triangle)
Pure Price Action StrategyTest Price Action Strategy from Lux Pure Price Action Indicator
How This Strategy Works:
Recognizing Trends & Reversals:
Break of Structure (BOS): A bullish signal indicating a trend continuation.
Market Structure Shift (MSS): A bearish signal indicating a potential reversal.
Analyzing Market Momentum:
It uses recent highs and lows to confirm whether the price is making higher highs (bullish) or lower lows (bearish).
Customizing Visualization Styles:
Buy signals (BUY Signal) are plotted as green upward arrows.
Sell signals (SELL Signal) are plotted as red downward arrows.
Stop-Loss (SL) & Take-Profit (TP): Configurable via percentage input.
IU Gap Fill StrategyThe IU Gap Fill Strategy is designed to capitalize on price gaps that occur between trading sessions. It identifies gaps based on a user-defined percentage threshold and executes trades when the price fills the gap within a day. This strategy is ideal for traders looking to take advantage of market inefficiencies that arise due to overnight or session-based price movements. An ATR-based trailing stop-loss is incorporated to dynamically manage risk and lock in profits.
USER INPUTS
Percentage Difference for Valid Gap - Defines the minimum gap size in percentage terms for a valid trade setup. ( Default is 0.2 )
ATR Length - Sets the lookback period for the Average True Range (ATR) calculation. (default is 14 )
ATR Factor - Determines the multiplier for the trailing stop-loss, helping in risk management. ( Default is 2.00 )
LONG CONDITION
A gap-up occurs, meaning the current session opens above the previous session’s close.
The price initially dips below the previous session's close but then recovers and closes above it.
The gap meets the valid percentage threshold set by the user.
The bar is not the first or last bar of the session to avoid false signals.
SHORT CONDITION
A gap-down occurs, meaning the current session opens below the previous session’s close.
The price initially moves above the previous session’s close but then closes below it.
The gap meets the valid percentage threshold set by the user.
The bar is not the first or last bar of the session to avoid false signals.
LONG EXIT
An ATR-based trailing stop-loss is set below the entry price and dynamically adjusts upwards as the price moves in favor of the trade.
The position is closed when the trailing stop-loss is hit.
SHORT EXIT
An ATR-based trailing stop-loss is set above the entry price and dynamically adjusts downwards as the price moves in favor of the trade.
The position is closed when the trailing stop-loss is hit.
WHY IT IS UNIQUE
Precision in Identifying Gaps - The strategy focuses on real price gaps rather than minor fluctuations.
Dynamic Risk Management - Uses ATR-based trailing stop-loss to secure profits while allowing the trade to run.
Versatility - Works on stocks, indices, forex, and any market that experiences session-based gaps.
Optimized Entry Conditions - Ensures entries are taken only when the price attempts to fill the gap, reducing false signals.
HOW USERS CAN BENEFIT FROM IT
Enhance Trade Timing - Captures high-probability trade setups based on market inefficiencies caused by gaps.
Minimize Risk - The ATR trailing stop-loss helps protect gains and limit losses.
Works in Different Market Conditions - Whether markets are trending or consolidating, the strategy adapts to potential gap fill opportunities.
Fully Customizable - Users can fine-tune gap percentage, ATR settings, and stop-loss parameters to match their trading style.
Fibonacci-Only Strategy V2Fibonacci-Only Strategy V2
This strategy combines Fibonacci retracement levels with pattern recognition and statistical confirmation to identify high-probability trading opportunities across multiple timeframes.
Core Strategy Components:
Fibonacci Levels: Uses key Fibonacci retracement levels (19% and 82.56%) to identify potential reversal zones
Pattern Recognition: Analyzes recent price patterns to find similar historical formations
Statistical Confirmation: Incorporates statistical analysis to validate entry signals
Risk Management: Includes customizable stop loss (fixed or ATR-based) and trailing stop features
Entry Signals:
Long entries occur when price touches or breaks the 19% Fibonacci level with bullish confirmation
Short entries require Fibonacci level interaction, bearish confirmation, and statistical validation
All signals are visually displayed with color-coded markers and dashboard
Trading Method:
When a triangle signal appears, open a position on the next candle
Alternatively, after seeing a signal on a higher timeframe, you can switch to a lower timeframe to find a more precise entry point
Entry signals are clearly marked with visual indicators for easy identification
Risk Management Features:
Adjustable stop loss (percentage-based or ATR-based)
Optional trailing stops for protecting profits
Multiple take-profit levels for strategic position exit
Customization Options:
Timeframe selection (1m to Daily)
Pattern length and similarity threshold adjustment
Statistical period and weight configuration
Risk parameters including stop loss and trailing stop settings
This strategy is particularly well-suited for cryptocurrency markets due to their tendency to respect Fibonacci levels and technical patterns. Crypto's volatility is effectively managed through the customizable stop-loss and trailing-stop mechanisms, making it an ideal tool for traders in digital asset markets.
For optimal performance, this strategy works best on higher timeframes (30m, 1h and above) and is not recommended for low timeframe scalping. The Fibonacci pattern recognition requires sufficient price movement to generate reliable signals, which is more consistently available in medium to higher timeframes.
Users should avoid trading during sideways market conditions, as the strategy performs best during trending markets with clear directional movement. The statistical confirmation component helps filter out some sideways market signals, but it's recommended to manually avoid ranging markets for best results.
Vortex Sniper XVortex Sniper X – Trend-Following Strategy
🔹 Purpose
Vortex Sniper X is a trend-following strategy designed to identify strong market trends and enter trades in the direction of momentum. By combining multiple technical indicators, this strategy helps traders filter out false signals and only take trades with high confidence.
🔹 Indicator Breakdown
1️⃣ Vortex Indicator (Trend Direction & Strength)
Identifies the trend direction based on the relationship between VI+ and VI-.
Bullish Signal: VI+ crosses above VI-.
Bearish Signal: VI- crosses above VI+.
The wider the gap between VI+ and VI-, the stronger the trend’s momentum.
2️⃣ Relative Momentum Index (RMI – Momentum Confirmation)
Confirms whether price momentum supports the trend direction.
Long confirmation: RMI is rising and above the threshold.
Short confirmation: RMI is falling and below the threshold.
Filters out weak trends that lack sufficient momentum.
3️⃣ McGinley Dynamic (Trend Baseline Filter)
A dynamic moving average that adjusts to market volatility for smoother trend identification.
Long trades only if price is above the McGinley Dynamic.
Short trades only if price is below the McGinley Dynamic.
Prevents trading in choppy or sideways markets.
🔹 Strategy Logic & Trade Execution
✅ Entry Conditions
A trade is executed only when all three indicators confirm alignment:
Trend Confirmation: McGinley Dynamic defines the trend direction.
Vortex Signal: VI+ > VI- (bullish) or VI- > VI+ (bearish).
Momentum Confirmation: RMI must agree with the trend direction.
✅ Exit Conditions
Trend Reversal: If the opposite trade condition is met, the current position is closed.
Trend Weakness: If the trend weakens (detected via trend shifts), the position is exited.
🔹 Take-Profit System
The strategy follows a multi-stage profit-taking approach to secure gains:
Take Profit 1 (TP1): 50% of the position is closed at the first target.
Take Profit 2 (TP2): The remaining 50% is closed at the second target.
🔹 Risk Management (Important Notice)
🔴 This strategy does NOT include a stop-loss by default.
Trades rely on trend reversals or early exits to close positions.
Users should manually configure a stop-loss if risk management is required.
💡 Suggested risk management options:
Set a stop-loss at a recent swing high/low or an important support/resistance level.
Adjust position sizing according to personal risk tolerance.
🔹 Default Backtest Settings
To ensure realistic backtesting, the following settings are used:
Initial Capital: $1,000
Position Sizing: 10% of equity per trade
Commission: 0.05%
Slippage: 1 pip
Date Range: Can be adjusted for different market conditions
🔹 How to Use This Strategy
📌 To get the best results, follow these steps:
Apply the strategy to any TradingView chart.
Backtest before using it in live conditions.
Adjust the indicator settings as needed.
Set a manual stop-loss if required for your trading style.
Use this strategy in trending markets—avoid sideways conditions.
⚠️ Disclaimer
🚨 Trading involves risk. This strategy is for educational purposes only and should not be considered financial advice.
Past performance does not guarantee future results.
Users are responsible for managing their own risk.
Always backtest strategies before applying them in live trading.
🚀 Final Notes
Vortex Sniper X provides a structured approach to trend-following trading, ensuring:
✔ Multi-indicator confirmation for higher accuracy.
✔ Momentum-backed entries to avoid weak trends.
✔ Take-profit targets to secure gains.
✔ No repainting—historical performance aligns with live execution.
This strategy does not include a stop-loss, so users must apply their own risk management methods.