📈 Supertrend + Volume Spike Strategy (AAPL Optimized)🚀 Overview
This strategy is specifically optimized for AAPL on the 45-minute timeframe, combining the Supertrend indicator with volume breakout confirmation and dynamic ATR-based trailing exits. Designed for high-frequency, low-drawdown performance, it maintains strong win rates with smart trade timing.
Whether you're trading tech stocks, indices, or crypto, this logic adapts well to trending markets and offers scalable position control for automated systems or manual traders.
🔍 How It Works
✅ Entry Conditions:
Supertrend flips bullish or bearish
Volume spike confirms move (volume > 1.3 × SMA(20))
Short cooldown to reduce noise
🔁 Exit Logic:
Trailing stop-loss based on ATR
Optional exit on opposite signal to lock gains or cut losses
📊 AAPL 45min Backtest Highlights
✅ Total P&L: +$278,454.67
✅ Profit Factor: 7.384
✅ Win Rate: 98.72%
✅ Drawdown: 1.15%
✅ Total Trades: 2,658
✅ Timeframe: 45-minute
✅ Symbol: AAPL (NASDAQ)
📌 Settings may be fine-tuned per asset or timeframe for maximum edge.
💡 Strategy Settings
ATR Period: 10
Supertrend: ATR = 10, Factor = 3.0
Volume Spike Threshold: 1.3 × SMA(20)
Cooldown Between Trades: 2 bars
Trailing Stop: 1.2 × ATR with offset
🧠 Generated by AI
This strategy was developed using an AI Pine Script Generator, trained to optimize trade logic for trend-based setups with visual clarity and risk control.
It combines real-time analytics with consistent logic tested across various assets and sessions.
🛠 How to Use
Add the script to AAPL 45m or similar trending asset
Adjust cooldown or trailing multiplier as needed
Enable alerts or automation for live setups
Test across assets like TSLA, BTC, QQQ, or ETHUSDT
💬 Final Thoughts
This system is ideal for trend-followers, breakout traders, and semi-automated setups. Use it as-is or evolve it with your own filters or dashboards.
Feedback and ideas are welcome — comment or reach out!
Indicators and strategies
LANZ Strategy 4.0 [Backtest]🔷 LANZ Strategy 4.0 — Strategy Execution Based on Confirmed Structure + Risk-Based SL/TP
LANZ Strategy 4.0 is the official backtesting engine for the LANZ Strategy 4.0 trading logic. It simulates real-time executions based on breakout of Strong/Weak Highs or Lows, using a consistent structural system with SL/TP dynamically calculated per trade. With integrated risk management and lot size logic, this script allows traders to validate LANZ Strategy 4.0 performance with real strategy metrics.
🧠 Core Components:
Confirmed Breakout Entries: Trades are executed only when price breaks the most recent structural level (Strong High or Strong Low), detected using swing pivots.
Dynamic SL and TP Logic: SL is placed below/above the breakout point with a customizable buffer. TP is defined using a fixed Risk-Reward (RR) ratio.
Capital-Based Risk Management: Lot size is calculated based on account equity, SL distance, and pip value (e.g. $10 per pip on XAUUSD).
Clean and Controlled Executions: Only one trade is active at a time. No new entries are allowed until the current position is closed.
📊 Visual Features:
Automatic plotting of Entry, SL, and TP levels.
Full control of swing sensitivity (swingLength) and SL buffer.
SL and TP lines extend visually for clarity of trade risk and reward zones.
⚙️ How It Works:
Detects pivots and classifies trend direction.
Waits for breakout above Strong High (BUY) or below Strong Low (SELL).
Calculates dynamic SL and TP based on buffer and RR.
Computes trade size automatically based on risk per trade %.
Executes entry and manages exits via strategy engine.
📝 Notes:
Ideal for evaluating the LANZ Strategy 4.0 logic over historical data.
Must be paired with the original indicator (LANZ Strategy 4.0) for live trading.
Best used on assets with clear structural behavior (gold, indices, FX).
📌 Credits:
Backtest engine developed by LANZ based on the official rules of LANZ Strategy 4.0. This script ensures visual and logical consistency between live charting and backtesting simulations.
NY Opening Range Breakout - MA StopCore Concept
This strategy trades breakouts from the New York opening range (9:30-9:45 AM NY time) on intraday timeframes, designed for scalping and day trading.
Setup Requirements
Timeframe: Works on any timeframe under 15 minutes (1m, 2m, 3m, 5m, 10m)
Session: New York market hours
Range Period: 9:30-9:45 AM NY time (15-minute opening range)
Entry Rules
Long Entries:
Wait for a candle to close above the opening range high
Enter long on the next candle (before 12:00 PM NY time)
Must be above moving average if using MA-based take profit
Short Entries:
Wait for a candle to close below the opening range low
Enter short on the next candle (before 12:00 PM NY time)
Must be below moving average if using MA-based take profit
Risk Management
Stop Loss:
Long trades: Opening range low
Short trades: Opening range high
Take Profit Options:
Fixed Risk Reward: 1.5x the range size (customizable ratio)
Moving Average: Exit when price crosses back through MA
Both: Whichever comes first
Key Features
Trade Direction Options:
Long Only
Short Only
Both directions
Moving Average Filter:
Prevents entries that would immediately hit stop loss
Uses EMA/SMA/WMA/VWMA with customizable length
Acts as dynamic support/resistance
Time Restrictions:
No entries after 12:00 PM NY time (customizable cutoff)
One trade per direction per day
Daily reset of all variables
Visual Elements
Red/green lines showing opening range
Purple line for moving average
Entry and breakout signals with shapes
Take profit and stop loss levels plotted
Information table with current status
Strategy Logic Flow
Morning: Capture 9:30-9:45 range high/low
Wait: Monitor for breakout (previous candle close outside range)
Filter: Check MA condition if using MA-based exits
Enter: Trade on next candle after breakout
Manage: Exit at fixed TP, MA cross, or stop loss
Reset: Start fresh next trading day
This is a momentum-based breakout strategy that capitalizes on early market volatility while using the opening range as natural support/resistance levels.
Lucy XAU/USD – EMA Scalping Strategy (5m Optimized) Lucy – EMA Scalping Strategy
🎯 Purpose
“Lucy” is a high-probability scalping strategy that combines momentum, trend alignment, and time-based filtering to generate clean entry signals for fast-moving assets like Gold.
⚙️ Core Components of the Strategy
1. EMA Cross Entry (Momentum Trigger)
Fast EMA (8) and Slow EMA (34) are used to catch short-term momentum.
A bullish crossover (8 EMA crosses above 34 EMA) = Long signal.
A bearish crossunder (8 EMA below 34 EMA) = Short signal.
This is the core trigger for entries.
2. Trend Filter with 200 MA
Trades are only taken in the direction of the larger trend.
Longs only if price > 200 MA (uptrend).
Shorts only if price < 200 MA (downtrend).
This ensures you're not fighting the macro trend — critical for scalping volatile markets like Gold.
3. Time Filter (Trading Session Control)
Trades are only allowed between 9:00 UTC and 14:00 UTC (by default).
This window is commonly aligned with London and New York overlap, where Gold tends to move most actively.
✅ You can customize these hours to match your trading session.
4. ATR-Based Stop Loss and Take Profit
Stop Loss = 1.5 × ATR
Take Profit = 2.5 × ATR
Why ATR? Because it adapts to current volatility. Gold's volatility shifts, and ATR gives dynamically scaled exits.
5. Signals and Alerts
Entry signals are marked with arrows:
🟢 Triangle Up = Long entry
🔴 Triangle Down = Short entry
Alerts can be triggered (popup, webhook, mobile) when:
A long or short setup occurs within the session window.
✅ How It Works (Flow Summary)
Condition Result
8 EMA crosses 34 EMA Entry trigger
Price above/below 200 MA Directional filter
Current time within 9–14 UTC Time filter passes
Entry triggered → SL/TP based on ATR Trade managed
🔍 Example Use Case (Gold Scalping)
You load the 5-minute XAU/USD chart.
Lucy shows a green triangle at 9:45 UTC — 8 EMA crossed up, price above 200 MA, and within session.
You auto or manually execute a long.
SL and TP are calculated based on current ATR (e.g., if ATR = $1.50, SL = $2.25, TP = $3.75).
If price hits TP, you exit profitably. If SL is hit, you control your loss size.
📈 Who Is This Strategy For?
Scalpers trading Gold, NASDAQ, or Crypto on 1m–15m charts.
Traders who prefer simple, rule-based entries with automatic filtering.
Anyone wanting to run backtests or build a bot-ready strategy on TradingView.
🛠️ Want to Expand It?
You can easily upgrade Lucy with:
✅ Volume Spike Filter – Confirm trades only when volume supports them.
✅ Multi-Timeframe Confirmation – e.g., only trade if 1H trend matches.
✅ Webhook Alerts – Automate execution via a trading bot like 3Commas, TradingView Alerts to MT4/MT5, etc.
3 EMA Trend Strategy (Locks Trailing Stop Tightening)How I Created a Smart Trading Strategy Using 3 EMAs + Trailing StopLoss with help of ChatGPT
Ever wondered if AI can really help with trading? I put it to the test by asking ChatGPT to build a strategy using 3 Exponential Moving Averages (EMAs). Here's what I got:
✅ Custom Pine Script
✅ Trend-based entry logic
✅ Clean exits using Trailing Stop Loss
✅ Backtested on multiple tickers (QQQ, NVDA, SPY, AAPL)
I wanted to say anyone create the strategies with their ideas. Just take help of chatGPT and tweak for better results.
Here’s a quick summary of what the strategy does:
Condition Action Taken
==============================================
EMAs aligned + pullback Enter LONG (Buy)
Trade reaches 10% profit Trailing Stop set to 5%
Trade reaches 20% profit Trailing Stop locked at 2%
Price drops to stop level Exit Trade
I've fine-tuned the code, which is available to public. It is been tested , see the performance on chart. More detailed description and shared all insights in my latest blog post on
eemanispace.com
Let me know your comments / feedback.
Ripster Cloud Trend Strategy - ParameterstyrdRipster Cloud Trend Strategy – Simple Explanation
This is a trend-following strategy that aims to enter trades early in a new trend using moving average crossovers. It uses four "clouds" made from different EMAs to identify the overall trend and timing of entries.
It goes long when the long-term trend is up and a shorter-term bullish crossover happens within certain zones.
It goes short when the long-term trend is down and a bearish crossover happens.
Once in a trade:
A fixed stop loss is placed.
After some time, it switches to a trailing stop based on EMA levels to lock in profits while staying in the trend.
It only exits when the stop loss is hit, not on new signals, and it allows only one trade at a time.
5m Scalping mit EMA Cross & S/R Zonen📋 Strategy Description – 5m Scalping with EMA Cross & S/R Zones
This TradingView strategy is aimed at short-term traders (scalpers) who trade on the 5-minute chart. It combines two proven techniques:
🔧 Strategy components
EMA Crossover Signals
Two exponential moving averages (EMAs) are calculated:
Fast EMA (default: 9)
Slow EMA (default: 21)
A long signal is created when the fast EMA crosses the slow EMA from bottom to top.
A short signal is created when the fast EMA crosses the slow EMA from top to bottom.
Pivot-based Support & Resistance Zones
Pivot highs and pivot lows are detected (default length: 10 bars).
From this, resistance (red) and support zones (green) are automatically drawn as horizontal lines.
A maximum of 5 S/R lines are displayed at the same time.
Risk management
A percentage stop loss (default: 0.5%) and take profit (default: 1.0%) are set for each position.
Positions Size: 10% of the account value (adjustable). 📈 Visualization The EMAs are displayed as colored lines (Orange = Fast, Blue = Slow). Signals appear as arrows (Green = Long, Red = Short). S/R zones help in categorizing the price structure.
2-Way Moon Phase Strategy (Buy Full/New, Sell Opposite)costumised strategy to use moon phases. It uses the moon pahees to let you know where they are so that you know whther to buy or to sell. It seems to work for back testing, use at your own discretion please, and thanks!
Trend Surge with Pullback FilterTrend Surge with Pullback Filter
Overview
Trend Surge with Pullback Filter is a price action-based strategy designed to enter strong trends not at the breakout, but at the first controlled pullback after a surge. It filters out noise by requiring momentum confirmation and low volatility conditions, aiming for better entry prices and reduced risk exposure.
How It Works
A strong upward trend is identified when the Rate of Change (ROC) exceeds a defined percentage (e.g., 2%).
Instead of jumping into the trend immediately, the strategy waits for a pullback: the price must drop at least 1% below its recent high (over the past 3 candles).
A low volatility environment is also required for entry — measured using ATR being below its 20-period average multiplied by a safety factor.
If all three conditions are met (trend + pullback + quiet volatility), the system enters a long position.
The trade is managed using a dynamic ATR-based stop-loss and a take-profit at 2x ATR.
An automatic exit occurs after 30 bars if neither SL nor TP is hit.
Key Features
- Momentum-triggered trend detection via ROC
- Smart pullback filter avoids overbought entries
- Volatility-based filter to eliminate noise and choppy conditions
- Dynamic risk-reward ratio with ATR-driven exit logic
- Time-limited exposure using bar-based exit
Parameter Explanation
ROC Length (10): Looks for short-term price surges
ROC Threshold (2.0%): Trend is considered valid if price increased more than 2%
Pullback Lookback (3): Checks last 3 candles for price retracement
Minimum Pullback % (1.0%): Entry only if price pulled back at least 1%
ATR Length (14): Measures current volatility
Low Volatility Multiplier (1.2): ATR must be below this multiple of its 20-period average
Risk-Reward (2.0): Target is set at 2x the stop-loss distance
Max Bars (30): Trade is closed automatically after 30 bars
Originality Statement
This strategy doesn’t enter at the trend start, unlike many momentum bots. Instead, it waits for the first market hesitation — a minor pullback under low volatility — before entering. This logic mimics how real traders often wait for a better entry after a breakout, avoiding emotional overbought buys. The combined use of ROC, dynamic pullback detection, and ATR-based environment filters makes it both practical and original for real-world trading.
Disclaimer
This strategy is intended for educational and research purposes. Backtest thoroughly and understand the logic before using with real capital.
Versi UT Bot Anti-Margin Call (Short SL = Take Profit)📌 Strategy Purpose
This strategy uses a UT Bot system based on ATR trailing stops to generate buy/sell signals. It is customized to focus on risk control and avoiding margin calls, especially in leveraged environments.
🔧 Input Parameters
Key Value (a): Sensitivity of the trailing stop (multiplier of ATR).
ATR Period (c): Lookback period for ATR calculation.
Use Heikin Ashi?: Option to apply Heikin Ashi candles instead of regular price.
Risk % per Trade: Fraction of account equity to risk per trade.
Minimum Position Size: Ensures a base size for positions regardless of calculations.
🔍 Core Components
1. Price Source
pinescript:
src = h ? request.security(haTicker, timeframe.period, close) : close
Allows the user to switch between regular candles and Heikin Ashi candles.
2. ATR & Trailing Stop
A dynamic, price-following trailing stop:
pinescript:
xATRTrailingStop := ...
Adjusts upward when price rises and downward when price falls. It’s the foundation for signal generation.
3. UT Bot Buy/Sell Signals
Based on crossover/crossunder of price and the trailing stop:
pinescript:
buySignal = ta.crossover(close, xATRTrailingStop)
sellSignal = ta.crossunder(close, xATRTrailingStop)
4. Risk Management & Position Sizing
Trade size is calculated dynamically:
pinescript:
longQty = ...
shortQty = ...
Based on account equity and ATR-derived risk, with a minimum size enforced.
5. Trend Detection
Simple trend filter using moving averages:
pinescript:
isTrendUp = ta.sma(close, 5) > ta.sma(close, 20)
isTrendDown = ta.sma(close, 5) < ta.sma(close, 20)
Currently not actively used in entries.
6. Entry & Exit Logic
Long Entry:
Triggered by buySignal.
Closes existing short, enters long with calculated size.
SL = max(2 x ATR, 10% of last profit or capital).
Short Entry:
Triggered by sellSignal.
Closes existing long, enters short.
Exit logic acts like a take profit using a stop at entryPrice - stopLoss.
7. Visuals & Alerts
Plots buy/sell labels and bar colors. Alerts can be set for both signal types.
⚠️ Strengths
Strong risk management through dynamic stop-loss and position sizing.
Designed to avoid margin calls by preventing oversizing.
Heikin Ashi compatibility may smooth signals in volatile conditions.
Visuals and alerts enhance user interaction.
❌ Potential Weaknesses
Short position exit uses a stop loss, but functions more like a take profit.
Trend detection is calculated but not used in entry decisions.
No re-entry logic after a stop-out.
Does not use strategy.opentrades for deeper trade control.
✅ Suggestions for Improvement
Actively apply the trend filter to validate entries.
Use strategy.opentrades to manage trade conditions more intelligently.
Add a real take profit logic for long trades (to mirror short side).
Consider using the trailing stop for exits as well, not just for signals.
RSI + 止盈比例策略 修正版lt's a simple strategy
applicable to eth one hour
automatic profit taking
it only applies to an upward trend
so the overall profit and loss look very bad
welcome to correct
S/R Breakout Strategy (1H) with Trend and ADX Filterben10 script for bot. will be updating soon. disable shorts
Dual MACD Strategy [Js.k]Strategy Overview
The Dual MACD Strategy leverages two MACD indicators with different parameters to generate buy and sell signals. By combining the trend-following properties of MACD with specific entry/exit criteria, this strategy aims to capture significant price movements while effectively managing risk.
Entry and Exit Conditions
Long Entry: A buy signal is triggered when:
The histogram of MACD1 crosses above zero.
The histogram of MACD2 is positive and rising.
Short Entry: A sell signal is triggered when:
The histogram of MACD1 crosses below zero.
The histogram of MACD2 is negative and declining.
Risk Management
Stop Loss and Take Profit:
Stop Loss is set at 1% below the entry price for long positions and 1% above the entry price for short positions.
Take Profit is set at 1.5% above the entry price for long positions and 1.5% below the entry price for short positions.
Position Sizing: Each trade risks a maximum of 10% of account equity, keeping potential losses manageable and in line with standard trading practices.
Backtesting Results
The strategy is tested on BTCUSDT with a time frame of 1 hour, resulting in 200+ trades.
The initial capital for backtesting is set to $10,000, with a realistic commission of 0.04% and a slippage of 2 ticks.
Conclusion
This strategy is inspired by Dreadblitz's Double MACD Buy and Sell, as well as some YouTube videos. My purpose in redeveloping them into this strategy is to validate the practicality of the Double MACD. After multiple modifications, this is the final version. I believe its profitability is limited and may lead to losses; please do not use this strategy for live trading.
RSI SwingRadar🧠 Strategy Overview
This long-only strategy combines RSI/MA crossovers with ATR-based risk management, designed for cleaner entries during potential bounce phases — especially tuned for assets like XMR/USDT.
🔍 Core Logic:
- RSI Crossover: Entry occurs when the 14-period RSI crosses above its 14-period SMA, signaling a potential shift in momentum.
- Oversold Filter: The RSI must have been below a user-defined oversold threshold (default: 35) on the previous candle, filtering for bounce setups after a pullback.
- ATR-Based Stop/Target: Stop-loss is placed below the low by a user-adjustable ATR multiplier (default: 0.5×). Take-profit is calculated with a Risk:Reward multiplier (default: 4×).
These elements work in tandem — RSI crossovers give momentum confirmation, oversold filtering adds context, and ATR-based exits adapt to volatility, creating a compact yet responsive strategy.
📉 Visuals:
- Dynamic Bands: The chart displays the active stop-loss, entry price, and take-profit as colored bands for easy visual tracking.
- Clean Overlay: Designed with simplicity — only confirmed setups are shown, keeping noise low.
✅ Suggested Use:
- Works best on XMR/USDT or similarly trending assets.
- Best suited for pullback entries during broader uptrends.
- Adjustable for different volatility conditions and asset behaviors.
⚠️ Disclaimer
- This strategy is for educational and research purposes only.
- It does not guarantee profitability in any market.
- Always backtest, forward-test, and understand your own risk tolerance before using any
strategy in a live environment.
- Past performance is not indicative of future results.
- This script is not financial advice.
ScalpGuard XRP M1 - Ultra EnhancedXRP Strategy that provide signals when to buy and when to exit the trade. This is not 100% accurate
EURUSD 90% Win Rate Strategy with Risk Control//@version=5
strategy("EURUSD 90% Win Rate Strategy with Risk Control", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
emaFast = ta.ema(close, 5)
emaSlow = ta.ema(close, 20)
rsi = ta.rsi(close, 14)
// Entry Conditions
longCondition = ta.crossover(emaFast, emaSlow) and rsi < 70
shortCondition = ta.crossunder(emaFast, emaSlow) and rsi > 30
// Risk Settings
accountBalance = 5000 // starting capital
maxLossPerTrade = 250 // risk 5% per trade
stopLossPerc = 0.01 // 1% stop loss
takeProfitPerc = 0.02 // 2% take profit
// Calculate position size dynamically
riskPerUnit = close * stopLossPerc
positionSize = maxLossPerTrade / riskPerUnit
// Entry & Exit Logic
if (longCondition)
strategy.entry("Long", strategy.long, qty=positionSize)
strategy.exit("TP/SL Long", from_entry="Long", limit=close * (1 + takeProfitPerc), stop=close * (1 - stopLossPerc))
if (shortCondition)
strategy.entry("Short", strategy.short, qty=positionSize)
strategy.exit("TP/SL Short", from_entry="Short", limit=close * (1 - takeProfitPerc), stop=close * (1 + stopLossPerc))
EURUSD 90% Win Rate Strategy with Risk Control//@version=5
strategy("EURUSD 90% Win Rate Strategy with Risk Control", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
emaFast = ta.ema(close, 5)
emaSlow = ta.ema(close, 20)
rsi = ta.rsi(close, 14)
// Entry Conditions
longCondition = ta.crossover(emaFast, emaSlow) and rsi < 70
shortCondition = ta.crossunder(emaFast, emaSlow) and rsi > 30
// Risk Settings
accountBalance = 5000 // starting capital
maxLossPerTrade = 250 // risk 5% per trade
stopLossPerc = 0.01 // 1% stop loss
takeProfitPerc = 0.02 // 2% take profit
// Calculate position size dynamically
riskPerUnit = close * stopLossPerc
positionSize = maxLossPerTrade / riskPerUnit
// Entry & Exit Logic
if (longCondition)
strategy.entry("Long", strategy.long, qty=positionSize)
strategy.exit("TP/SL Long", from_entry="Long", limit=close * (1 + takeProfitPerc), stop=close * (1 - stopLossPerc))
if (shortCondition)
strategy.entry("Short", strategy.short, qty=positionSize)
strategy.exit("TP/SL Short", from_entry="Short", limit=close * (1 - takeProfitPerc), stop=close * (1 + stopLossPerc))
MNQ EMA StrategyThis strategy is not perfected yet. ONE MINUTE TIMEFRAME
The goal is to take Longs above the 5 ema when price is above all the 200, 30, and 5 ema.
Short side is when candle closes below the 5 ema and price is below the 300, 30, and 5 ema.
I use candle range blocks for different time zones to avoid excess orders from being triggered. As well as blocks when stoploss is hit or after a profitable trade of certain ticks.
There is an RSI to avoid trades when there isn't too much movement.
My goal is to get an entry when price trades above the 5 ema and then next candle passes it by .25 instead of entering immediately. The stoploss as the low of candle before entry and TP as 3 times the stoploss. I've tried a million times to make it like this but I don't know how to use pine script or Code.
The sell side is basically the same, enter at candle close below 5 ema wait for low to get swept to enter and stoploss above previous high, with TP 3 times the stoploss.
Publishing in hopes anyone knows how to adjust this
CAUTION THIS STRATEGY WORKS WITH CURRENT PRICE ACTION DUE TO ME USING RECENT TICK COUNT RATHER THAN BASED ON CANDLES OR PERCENTAGES. THIS WILL ONLY WORK AS LONG AS MARKET MOVES AS IT HAS BEEN SINCE 2024. CME_MINI:MNQ1!
Hammer + EMA Strategy with Tick-based SL/TPWhat This Script Does:
Detects Hammer (bullish reversal) and Inverted Hammer (bearish reversal) patterns
Requires a simple trend context (using 2 bars back)
Confirms price position relative to EMA 50
Applies tick-based SL and TP
Plots buy/sell signals on chart with emoji labels
Contrarian PRO - Smart MoneyContrarian PRO - Smart Money" for TradingView detects liquidity sweeps and CHoCH signals to enter against the crowd, with dynamic TP/SL based on ATR and proper risk management per trade.
You can test it on BTC or gold using the 1H or 30M timeframe.
Reversal Trap Sniper – Verified VersionReversal Trap Sniper
Overview
Reversal Trap Sniper is a counterintuitive momentum-following strategy that identifies "reversal traps"—situations where traders expect a market reversal based on RSI, but the price continues trending. By detecting these failed reversal signals, the strategy enters trades in the trend direction, often catching strong follow-through moves.
How It Works
The system monitors the Relative Strength Index (RSI). When RSI moves above the overbought level (e.g., 70) and then drops back below it, many traders interpret this as a sell signal.
However, this strategy treats such moves with caution. If the RSI pulls back below the overbought threshold but the price continues to rise, the system considers it a "reversal trap"—a fakeout.
In such cases, instead of going short, the strategy enters a long position, assuming that the trend is still valid and those betting on a reversal may fuel a breakout.
Similarly, if RSI rises above the oversold level from below, but price continues falling, a short trade is triggered.
Entries are followed by ATR-based stop-loss and dynamic take-profit (2× risk), with a fallback time-based exit after 30 bars.
Key Features
- Detects failed RSI-based reversals ("traps")
- Follows momentum after the trap is triggered
- Uses ATR for dynamic stop-loss and take-profit
- Auto-exit after a fixed bar count (30 bars)
- Visual markers on chart for transparency
- Realistic trading assumptions: 0.05% commission, slippage, and capped pyramiding
Parameter Explanation
RSI Length (14): Standard RSI calculation period
Overbought/Oversold Levels (70/30): Common thresholds used by many traders
ATR Length (14): Used to define stop-loss and target dynamically
Risk-Reward Ratio (2.0): Take-profit is set at 2× the stop-loss distance
Max Holding Bars (30): Ensures trades don’t remain open indefinitely
Pyramiding (10): Allows scaling into trades, simulating real-world strategy stacking
Originality Note
This strategy inverts traditional RSI logic. Instead of treating overbought/oversold conditions as signals for reversal, it waits for those signals to fail. Only after such failures, confirmed by continued price action in the same direction, does the system enter trades. This logic is based on the behavioral observation that failed reversal signals often trigger stronger trend continuation—making this strategy uniquely positioned to exploit trap scenarios.
Disclaimer
This script is for educational and research purposes only. Trading involves risk, and past performance does not guarantee future results. Always test thoroughly before applying with live capital.