xauusd:Only suitable for 1 minute, short-term tradingxauusd
:Only suitable for 1 minute, short-term trading
Göstergeler ve stratejiler
EMA Crossover Entry + ATR ExitOverview
A robust trend-following strategy that combines multiple Exponential Moving Averages (EMAs) for precise entry signals with smoothed Average True Range (ATR) for dynamic, volatility-based exits. Designed for traders who want to capture strong trending long-term moves while protecting profits with intelligent stop-loss management.
Strategy Logic
Entry Signal:
- Enters LONG when price closes above EMA 20, AND
- EMA 20 > EMA 50 > EMA 100 > EMA 200 (Perfect bull alignment)
Ensures entry only during confirmed uptrends with all EMAs properly stacked
Exit Signal:
- Uses smoothed ATR.
- Creates dynamic trailing stop that adjusts to market volatility
- Exits when price closes below ATR.
Check volume in addition to this, to boost confidence for your entry.
This works well for Long Term Investment.
Use Daily or Weekly timeframe.
Key Features
✅ Trend Confirmation: Four-EMA stack ensures strong trend alignment before entry
✅ Volatility-Adaptive Exits: ATR smoothing prevents whipsaw exits in choppy markets
Perfect for traders seeking systematic trend-following with professional risk management. Combines the reliability of multiple timeframe trend confirmation with the precision of volatility-based exits.
Happy Investing!
:)
Feel free to provide feedback; I would love to hear from you.
Note:
Strategy executes on bar close to prevent repainting.
Past performance does not guarantee future results.
Use proper risk management.
Volume Spike Strategy by CzechroninThis strategy uses VOlume spikes to enter big trades
~
Czechronin
EEI Strategy — Greedy/Guarded v1.2Purpose
Day‑trading strategy (5‑min focus) that hunts “armed” setups (PRE) and confirms them (GO) with greedy-but‑guarded execution. It adapts to symbol type, trend strength, and how long it’s been since the last signal.
Core signals & regime
Trend/Regime: EMA‑200 (intraday bias), VWAP, and a non‑repainting HTF EMA (via request.security(...) ).
Momentum/Structure: Manual Wilder DMI/ADX, micro‑ribbon (EMA 8/21), Bollinger‑Keltner squeeze + “squeeze fire,” BOS (break of swing high/low), pullback to band.
Liquidity/Vol: RVOL vs SMA(volume) + a latch (keeps eligibility a few bars after the first spike).
Volatility: ATR + ATR EMA (expansion).
PRE / GO engine
Score (0–100) aggregates trend, momentum, RVOL, squeeze, OBV slope, ribbon, pullback, BOS, and an Opening‑Range (OR) proximity penalty.
PRE arms when the adjusted score ≥ threshold and basic hygiene passes (ATR%, cooldown, etc.).
GO confirms within a dynamic window (1–3 bars):
Wick‑break mode on hot momentum (trend‑day / high ADX+RVOL): stop orders above/below the PRE high/low with a tick buffer.
Close‑through mode otherwise: close must push through PRE high/low plus ATR buffer.
Chase guard: entry cannot be too far from PRE price (ATR‑based), with a tiny extra allowance when the 8/21 ribbon aligns.
Multiple PREs per squeeze (capped) + per‑entry cooldown.
Adaptive behavior
Presets (Conservative/Balanced/Aggressive/Turbo) shift score/ADX/RVOL/ATR gates, GO window, cooldown, and max chase.
Profiles / Auto by Symbol:
Mega Trend (e.g., AMD/NVDA/TSLA/AAPL): looser chase, ATR stop, chandelier trail.
Mid Guarded (e.g., TTD/COIN/SOFI): swing stop, EMA trail, moderate gates.
Small Safe (e.g., BTAI/BBAI class): tighter gates, more guardrails.
BBAI micro‑override: easier arming (lower score/ADX/RVOL), multi‑PRE=3, swing stop + EMA trail, lighter OR penalty.
Trend‑day detector: if ADX hot + RVOL strong + ATR expanding + distance from day‑open large → GO window = 1 and wick‑break mode.
Mid‑day relaxers: mild score bonus between 10:30–14:30 to keep signals flowing in quieter tape.
Auto‑Relaxer (no‑signal fallback): after N bars without PRE/GO, gradually lowers score/ADX/RVOL/ATR% gates and raises max chase so the engine doesn’t stall on sleepy symbols.
Auto‑Session fallback: if RTH session isn’t detected (some tickers/premarket), it falls back to daily boundaries so Opening Range and day‑open logic still work.
Risk & exits
Initial stop per side chosen by ATR, Swing, or OR (computed every bar; no conditional calls).
Scaled targets: TP1/TP2 (R‑based) + runner with optional Chandelier or EMA trailing.
BE logic: optional move to breakeven after TP1; trailing can start after TP1 if configured.
Opening Range (OR)
Computes day open, OR high/low over configurable minutes; applies a penalty when entries are too close to OR boundary (lighter for small caps/BBAI). Protects against boundary whips.
Alerts & visuals
Alertconditions: PRE Long/Short Armed, GO Long/Short + explicit alert() calls for once‑per‑bar automation.
Plots: EMA‑200, HTF EMA, BB/KC bands, OR lines, squeeze shading, and PRE markers.
Why it’s robust
Non‑repainting HTF technique, all series precomputed every bar, no function calls hidden in conditionals that could break history dependence, and consistent state handling (var + sentinels).
Tuning cheat‑sheet (fast wins)
More trades: lower scoreBase, adxHot, or rvolMinBase a notch; reduce cooldownBase; increase maxPREperSqueeze.
Fewer whips: increase closeBufferATR, wickBufferTicks, or atrMinPct; reduce maxChaseATRBase.
Trend capture: use trailType="Chandelier", smaller trailLen, slightly larger trailMult; set preset="Aggressive".
Choppy names: prefer stopMode="Swing", enable EMA trail, keep OR penalty on.
EDWARDS SQUEEZE 3MINUTE DOWSqueeze Momentum Strategy with EMA780 Trend Filter, ATR-SL, PT, EMA5 Exit Filter, and 3:57 PM Close
BB Squeeze + Keltner Breakout + VolumeHow the Strategy Works
Bollinger Bands Squeeze: The strategy first looks for a "squeeze" in the Bollinger Bands. This happens when the bands narrow significantly, indicating a period of low market volatility and potential consolidation. The bbSqueeze variable becomes true when the Bollinger Bandwidth falls below a set
Elliott Wave Oscillator + PSAR + VolumeStrategy Logic
1. Indicators
Elliott Wave Oscillator (EWO): This oscillator measures the difference between a 5-period and a 35-period exponential moving average (EMA). It's used to identify momentum shifts and potential wave structures. A buy signal is triggered when the EWO crosses above its signal line (a 5-period simple moving average). A sell signal is triggered when it crosses below.
Parabolic SAR (PSAR): This indicator shows potential reversals in price direction. A buy signal requires the PSAR to be below the current price, indicating an uptrend. A sell signal requires the PSAR to be above the current price, indicating a downtrend.
Volume: The strategy checks for significant changes in volume compared to its 20-period simple moving average (SMA). A buy signal requires a volume increase of at least 20% above the SMA. A sell signal requires a volume decrease of at least 20% below the SMA.
EMA 200: This long-term moving average is used to determine the overall market trend. A buy signal is only considered when the EMA 200 is rising (uptrend). A sell signal is only considered when the EMA 200 is falling (downtrend).
2. Entry and Exit Conditions
Long (Buy) Entry: A long position is entered if all of the following conditions are met:
EWO crosses its signal line upwards.
PSAR is below the price.
Volume has increased significantly.
The EMA 200 is rising.
The current candle is a bullish candle (close > open).
Short (Sell) Entry: A short position is entered if all of the following conditions are met:
EWO crosses its signal line downwards.
PSAR is above the price.
Volume has decreased significantly.
The EMA 200 is falling.
The current candle is a bearish candle (close < open).
Exit Conditions: Both long and short positions have a fixed 1% take profit and a 1% stop loss to manage risk.
In summary, the strategy only enters trades when a combination of momentum (EWO), trend (PSAR, EMA 200), and volume indicators align in the same direction, with strict risk management in place.
FFH_Golden Gate StrategyThe FFH_Golden Gate Strategy is a method designed to help identify strong opportunities to enter and exit the market with discipline. It works by following the natural flow of price movements and identifying when prices are trending higher in a consistent way. The strategy uses a special average that adapts to the market, helping to separate meaningful trends from random fluctuations.
A buy signal is generated when the price moves significantly above this average, indicating strong upward momentum. This approach ensures that trades are only taken when the market shows clear strength, rather than during sideways or uncertain conditions.
An exit signal occurs when the price falls below the average, suggesting that the upward trend may be weakening. This allows the strategy to lock in gains and avoid holding positions when the market is turning against you.
Overall, the strategy is based on the simple idea of following the trend, entering on strength, and exiting before losses grow, providing a structured and disciplined approach to trading without relying on guesswork or emotional decisions.
Heiken Ashi + Ichimoku Baseline ScalperHi
This a trend identification strategy. You can hold your trade as long as the signals are in your favor.
Becomnigforextrader XAU M1 ScalperHi
The blue line is baseline of ichimoku or kiju sen. When thee is divergence between pice and baseline, the signals are not correct.
As long as there are signals in your trade direction, you can hold your trade.
This strategy depicts mometum and current trend.
CVD Daily High/Low Breakout StrategyThis script implements a breakout-based approach using Cumulative Volume Delta (CVD) alongside price action, designed for educational and analytical purposes on TradingView charts. It plots CVD as a candle chart and draws horizontal lines for session highs and lows in CVD and price, which are used to identify potential breakout points. Entries are triggered when both CVD and price break these levels, confirmed by swing patterns, EMA alignment, and multi-timeframe Supertrend direction. Exits are managed with a user-defined risk-reward ratio and stop-loss based on recent swings.
Key Components:
CVD Calculation: Utilizes TradingView's ta.requestVolumeDelta to approximate volume delta from lower timeframes, plotted as candles for visual analysis.
Session Management: Starts a new session at a user-specified UTC time (default 22:00), tracking highs/lows in CVD and price until an EMA cross ends the session.
Breakout Logic: Requires dual confirmation (CVD and price breakout) with a delta proportion check to filter outliers.
Filters: Incorporates swing high/low detection with candlestick patterns (e.g., hammers, engulfing) for stop placement, and Supertrend on two higher timeframes (default H1 and H4) for trend alignment.
Table Display: Shows Supertrend trends from the selected timeframes in a top-right table for quick reference.
Inputs:
Anchor Period: Timeframe for CVD reset (default "1D").
EMA Length: Period for the EMA used in session ending (default 200).
Start Time (UTC): Hour and minute to begin daily sessions (default 22:00).
Pivot Length: Bars for swing detection (default 5).
Risk Reward Ratio: Multiplier for take-profit relative to stop-loss (default 1.0).
Supertrend Settings: Source (close), ATR period (10), multiplier (3.0), and two timeframes (60m, 240m).
Line Colors/Width: Customizable for high/low CVD lines.
This script is intended solely for informational and educational use to explore volume delta and breakout concepts. It does not constitute financial, investment, trading, or any other type of advice or recommendation. Past performance, including any backtest results, is not indicative of future results, and trading involves substantial risks, including the potential for significant losses. Users should conduct their own research, consult qualified financial professionals, and consider their individual financial situation before making any trading decisions. TradingView does not endorse this script or its content, and neither the author nor TradingView is liable for any losses incurred from its use. All trading activities are at your own risk.
光速量化-头皮策略v1.1Version: Unlimited trial version.
Principle: RSI and moving average complement each other, taking a bite of both oscillation and trend.
Disadvantage: High drawdown.
Disclaimer: The scalp strategy v1.1 of Lightspeed Quantification is designed for trial users. Those who use this strategy are responsible for their own assets, and any losses incurred are not the responsibility of the author.
版本:无期限试用版。
原理:RSI与均线配合,震荡与趋势都吃一口。
缺点:回撤高。
声明:光速量化的头皮策略v1.1是面向试用者体验的,使用该策略的人请为自己的资产负责,产生任何损失与作者无关。
The Barking Rat PercentilesPercentile Reversion with Multi-Layered Smoothing
The Barking Rat Percentiles is a multi-tiered reversion strategy based on fixed percentage movements away from the mean, designed to capture price extremes through a structured, practical approach. It combines statistically derived percentile bands, RSI momentum filtering, and ATR-driven exits to identify potential turning points while managing opportunity with precision. The aim is to isolate high-quality reversal opportunities at progressively deeper extremes while avoiding noise and low-conviction setups.
At its core, the strategy measures the current market position relative to long-term percentile thresholds. When price moves significantly beyond these smoothed levels and momentum shows signs of exhaustion, staged entries are triggered. Exits are managed using independent ATR-based take profit and stop loss logic to adapt to varying volatility conditions.
🧠 Core Logic: Tiered Extremes & Structured Management
This strategy is intentionally methodical, layering multiple thresholds and validation checks before highlighting potential setups. By combining percentile-based extremes with momentum confirmation and adaptive trade management, it offers a disciplined and repeatable framework for mean reversion trading.
1. Percentile Thresholds as the Primary Framework
The script calculates the highest high and lowest low over a long lookback period of more than 1000 candles to define the overall price range. It then derives upper and lower percentile thresholds to determine extreme price levels. These thresholds are smoothed using a simple moving average to filter out short-term noise, ensuring that only statistically significant deviations from the mean are considered for potential trades.
2. Multi-Tier Entry Levels
Based on the percentile distance away from the mean, the script plots and references five discrete trigger levels beyond the primary thresholds for both long and short positions. Each tier represents progressively deeper extremes, typically 1–3% beyond the smoothed threshold, balancing the benefits of early entries with the safety of more confirmed extremes. Custom logic ensures only one signal is generated per threshold level, avoiding duplicate entries in the same zone.
3. RSI Momentum Filter
A 14-period RSI filter is applied to prevent entering trades against strong momentum. Long trades are only triggered when RSI falls below 30 (oversold), and short trades only when RSI rises above 70 (overbought). This helps align entries with potential exhaustion points, reducing the risk of entering prematurely into a strong ongoing trend.
4. ATR-Based Trade Management
For each trade sequence, the strategy will exit on the first exit condition met: either the take profit (TP) or the stop loss (SL). Because the TP uses a smaller ATR multiplier, it’s generally closer to the entry price, so most trades will hit the TP before reaching the SL. The SL is intentionally set with a larger ATR multiplier to give the trade room to develop, acting as a protective fallback rather than a frequent exit.
So in practice, you’ll usually see the TP executed for a trade, and the SL only triggers in cases where price moves further against the position than expected.
5. Position Reset Logic
Once price returns to the smoothed threshold region, all entry tiers in that direction are reset. This allows the system to prepare for new opportunities if the market revisits extreme levels, without triggering duplicate trades at the same threshold.
Why These Parameters Were Chosen
Multi-tier thresholds ensure that only meaningful extremes are acted upon, while the long-range SMA provides historical context and filters out noise. The staged entry logic per level balances the desire for early participation with the discipline of risk management. ATR-based TP and SL levels adapt to changing volatility, while the RSI filter improves timing by aligning trades with potential exhaustion points. Together, these elements create a balanced, structured, and repeatable approach to mean reversion trading.
📈 Chart Visuals: Clear & Intuitive
Green “▲” below a candle: Potential long entry
Red “▼” above a candle: Potential short entry
Blue “✔️”: Exit when ATR take profit is hit
Orange “✘”: Exit when ATR stop loss is hit
Tier threshold lines (smoothed upper/lower bounds)
🔔Alerts: Stay Notified Without Watching
The strategy supports real-time alerts on candle close, ensuring that signals are only triggered once fully confirmed.
You must manually set up alerts within your TradingView account. Once configured, you’ll be able to set up one alert per instrument. This one alert covers all relevant signals and exits — ideal for hands-free monitoring.
⚙️Strategy report properties
Position size: 25% equity per trade
Initial capital: 10,000.00 USDT
Pyramiding: 10 entries per direction
Slippage: 2 ticks
Commission: 0.055% per side
Backtest timeframe: 1-minute
Backtest instrument: SOLUSDT
Backtesting range: Jul 28, 2025 — Aug 14, 2025
Note on Sample Size:
You’ll notice the report displays fewer than the ideal 100 trades in the strategy report above. This is intentional. The goal of the script is to isolate high-quality, short-term reversal opportunities while filtering out low-conviction setups. This means that the Barking Rat Percentiles strategy is ultra-selective, filtering out over 90% of market noise by enforcing multiple validation layers. The brief timeframe shown in the strategy report here illustrates its filtering logic over a short window — not its full capabilities. As a result, even on lower timeframes like the 1-minute chart, signals are deliberately sparse — each one must pass all criteria before triggering.
For a larger dataset:
Once the strategy is applied to your chart, users are encouraged to expand the lookback range or apply the strategy to other volatile pairs to view a full sample.
💡Why 25% Equity Per Trade?
While it's always best to size positions based on personal risk tolerance, we defaulted to 25% equity per trade in the backtesting data — and here’s why:
Backtests using this sizing show manageable drawdowns even under volatile periods
The strategy generates a sizeable number of trades, reducing reliance on a single outcome
Combined with conservative filters, the 25% setting offers a balance between aggression and control
Users are strongly encouraged to customize this to suit their risk profile.
🔍 What Makes This Strategy Unique?
Multi-Tier Percentile Triggers – Instead of relying on a single overbought/oversold zone, this strategy uses five distinct entry tiers per direction, allowing for staged, precision entries at progressively deeper extremes.
Long-Term Percentile Smoothing – By calculating extremes over a 1000+ candle range and smoothing them with a moving average, the strategy focuses only on statistically significant deviations.
Custom One-Signal-Per-Tier Logic – Prevents duplicate trades at the same threshold level, reducing overtrading and noise.
Dual ATR Exit System – Independent TP and SL levels adapt to volatility. TP uses a smaller ATR multiplier for realistic, achievable exits and generally executes first, while the SL has a larger ATR multiplier to provide protective breathing room if the trade moves further against the position.
Momentum-Aware Filtering – A 14-period RSI filter ensures trades are only taken when momentum is likely exhausted, avoiding entries into strong trends.
Automatic Position Reset – Once price normalizes, tiers reset, allowing for fresh entries without interference from previous trades.
No Wick Strategy (No-wick candles) — by Sh1n1gam1**No Wick Strategy - Momentum Trading System**
This strategy identifies and trades "no wick" or "minimal wick" candles, which often indicate strong directional momentum and conviction in the market.
**STRATEGY CONCEPT:**
The No Wick Strategy capitalizes on candles that show strong directional commitment - bullish candles with little to no bottom wick (buyers in control from the start) and bearish candles with little to no top wick (sellers dominating from the open).
**HOW IT WORKS:**
📈 **LONG ENTRIES:**
- Identifies bullish candles with minimal/no bottom wick
- Places buy limit order slightly below the signal candle's open
- Enters only during specified trading session
📉 **SHORT ENTRIES:**
- Identifies bearish candles with minimal/no top wick
- Places sell limit order slightly above the signal candle's close
- Enters only during specified trading session
**KEY FEATURES:**
✅ Customizable trading session (New York timezone)
✅ Flexible wick threshold (0% for strict, up to X% for flexibility)
✅ ATR-based stop loss for dynamic risk management
✅ Configurable risk-reward ratio via TP multiplier
✅ Auto-cancellation of unfilled orders after X bars
✅ Body size filters (minimum and maximum)
✅ Visual signals and pending order levels
✅ Position status display
**RISK MANAGEMENT:**
- Stop Loss: Based on ATR multiplier
- Take Profit: Multiple of stop loss distance
- One position at a time
- No pyramiding or position flipping
**RECOMMENDED TIMEFRAMES:**
- M1 and M5 for scalping
- M15 and H1 for day trading
- H4 and Daily for swing trading
**MARKETS:**
Suitable for forex pairs, indices (NQ, ES), commodities, and liquid stocks.
**DEFAULT SETTINGS:**
- Trading Session: 09:30-11:00 ET (NY morning session)
- ATR SL Multiplier: 1.5
- TP Multiplier: 2.0 (2:1 RR ratio)
- Wick Threshold: 5%
- Order Cancellation: 5 bars
**TIPS FOR OPTIMIZATION:**
1. Adjust trading session to match your market's most active hours
2. Test different wick thresholds (0-10%) based on market volatility
3. Optimize body size filters for your specific instrument
4. Backtest different ATR multipliers for your risk tolerance
5. Consider market conditions - works best in trending markets
**IMPORTANT NOTES:**
- Uses limit orders for better entry prices
- Does not close opposing positions (no position flipping)
- Respects trading session boundaries strictly
- All times are in America/New_York timezone
**AUTHOR:** Sh1n1gam1
**VERSION:** 1.0
**SUPPORT:** Comments and suggestions welcome!
Happy Trading! 📊
Breakout asia USD/CHF1 — Customizable Parameters
sess1 & sess2: The two time ranges that define the Asian session (e.g., 20:00–23:59 and 00:00–08:00).
Important: format is HHMM-HHMM.
rr: The risk/reward ratio (default = 3.0, meaning TP = 3× risk size).
onePerSess: Toggle to allow only one trade per Asian session or multiple.
bufTicks: Extra margin for the SL beyond the signal candle.
2 — Detecting the Asian Session
The script checks if the candle’s time is inside the first range (sess1) or inside the second range (sess2).
While inside the Asian session, it updates the current high and low.
When the session ends, it locks in these levels as rangeHigh and rangeLow.
3 — Step 1: Detecting the Initial Breakout
Bullish breakout → close above rangeHigh → flag breakoutUp is set to true.
Bearish breakout → close below rangeLow → flag breakoutDown is set to true.
No trade yet — this is just the breakout signal.
4 — Step 2: Waiting for the Retest
If a bullish breakout occurred, wait for the price to return to or slightly below rangeHigh and then close back above it.
If a bearish breakout occurred, wait for the price to return to or slightly above rangeLow and then close back below it.
5 — Entry & Exit
When the retest is confirmed:
strategy.entry() is triggered.
SL = behind the retest confirmation candle (with optional bufTicks margin).
TP = entry price ± RR × risk size.
If onePerSess is enabled, no further trades happen until the next Asian session.
6 — Chart Display
Green line = locked Asian session high.
Red line = locked Asian session low.
Light blue background = active Asian session hours.
Trade entries are shown on the chart when retests occur.
Open Range Breakout Strategy With Multi TakeProfitHello everyone,
For a while, I’ve been wanting to develop new scripts, but I couldn’t decide what to create. Eventually, I came up with the idea of coding traditional and well-known trading strategies—while adding modern features such as multi–take profit options. For the first strategy in this series, I chose the Open Range Strategy .
For those unfamiliar with it, the Open Range Strategy is a trading approach where you define a specific time period at the beginning of a trading session—such as the first 15 minutes, 30 minutes, or 1 hour—and mark the highest and lowest prices within that range. These levels then act as reference points for potential breakouts: if the price breaks above the range, it may signal a long entry; if it breaks below, it may indicate a short entry. This method is popular among day traders for capturing early momentum in the market.
Since this strategy is generally used as an intraday strategy , I added a Trade Session feature. This allows you to define the exact time window during which trades can be opened. Once the session ends, all positions are automatically closed, ensuring trades remain within your chosen intraday period.
Even though it’s a relatively simple concept, I’ve come across many different variations of it. That’s why I created a highly customizable project. Under the Session Settings, you can select the time window you want to define as your range. Whether it’s the first 15-minute candle or the entire first hour, the choice is entirely yours.
For stop-loss placement, there are two different options:
Middle of the Range – The stop loss is placed at the midpoint between the high and low of the defined range, offering a balanced buffer for both bullish and bearish setups.
Top/Bottom of the Range – The stop loss is placed just beyond the range’s high for short trades or just below the range’s low for long trades, providing a more conservative risk approach.
I’ve always been a big fan of the multi take-profit feature, so I added two different take-profit targets to this project. Take profits are calculated based on a Risk-to-Reward Ratio, which you can adjust in the settings. You can also set different position sizes for each target, allowing you to scale out of trades in a way that suits your strategy.
The result is a flexible, user-friendly strategy script that brings together a classic approach with modern risk management tools—ready to be tailored to your trading style
Backtest - Strategy Builder [AlgoAlpha]🟠 OVERVIEW
This script by AlgoAlpha is a modular Strategy Builder designed to let traders test custom trade entry and exit logic on TradingView without writing their own Pine code. It acts as a framework where users can connect multiple external signals, chain them in sequences, and run backtests with built-in leverage, margin, and risk controls. Its main strength is flexibility—you can define up to five sequential steps for entry and exit conditions on both long and short sides, with logic connectors (AND/OR) controlling how conditions combine. This lets you test complex multi-step confirmation workflows in a controlled, visual backtesting environment.
🟠 CONCEPTS
The system works by linking external signals —these can be values from other indicators, and/or custom sources—to conditional checks like “greater than,” “less than,” or “crossover.” You can stack these checks into steps , where all conditions in a step must pass before the sequence moves to the next. This creates a chain of logic that must be completed before a trade triggers. On execution, the strategy sizes positions according to your chosen leverage mode ( Cross or Isolated ) and allocation method ( Percent of equity or absolute USD value]). Liquidation prices are simulated for both modes, allowing realistic margin behaviour in testing. The script also tracks performance metrics like Sharpe, Sortino, profit factor, drawdown, and win rate in real time.
🟠 FEATURES
Up to 5 sequential steps for both long and short entries, each with multiple conditions linked by AND/OR logic.
Two leverage modes ( Cross and Isolated ) with independent long/short leverage multipliers.
Separate multi-step exit triggers for longs and shorts, with optional TP/SL levels or opposite-side triggers for flipping positions.
Position sizing by equity percent or fixed USD amount, applied before leverage.
Realistic liquidation price simulation for margin testing.
Built-in trade gating and validation—prevents trades if configuration rules aren’t met (e.g., no exit defined for an active side).
Full performance dashboard table showing live strategy status, warnings, and metrics.
Configurable bar coloring based on position side and TP/SL level drawing on chart.
Integration with TradingView's strategy backtester, allowing users to view more detailed metrics and test the strategy over custom time horizons.
🟠 USAGE
Add the strategy to your chart. In the settings, under Master Settings , enable longs/shorts, select leverage mode, set leverage multipliers, and define position sizing. Then, configure your Long Trigger and Short Trigger groups: turn on conditions, pick which external signal they reference, choose the comparison type, and assign them to a sequence step. For exits, use the corresponding Exit Long Trigger and Exit Short Trigger groups, with the option to link exits to opposite-side entries for auto-flips. You can also enable TP and/or SL exits with custom sources for the TP/SL levels. Once set, the strategy will simulate trades, show performance stats in the on-chart table, and highlight any configuration issues before execution. This makes it suitable for testing both simple single-signal systems and complex, multi-filtered strategies under realistic leverage and margin constraints.
🟠 EXAMPLE
The backtester on its own does not contain any indicator calculation; it requires input from external indicators to function. In this example, we'll be using AlgoAlpha's Smart Signals Assistant indicator to demonstrate how to build a strategy using this script.
We first define the conditions beforehand:
Entry :
Longs – SSA Bullish signal (strong OR weak)
Shorts – SSA Bearish signal (strong OR weak)
Exit
Longs/Shorts: (TP/SL hit OR opposing signal fires)
Other Parameters (⚠️Example only, tune this based on proper risk management and settings)
Long Leverage: default (3x)
Short Leverage: default (3x)
Position Size: default (10% of equity)
Steps
Load up the required indicators (in this example, the Smart Signals Assistant).
Ensure the required plots are being output by the indicator properly (signals and TP/SL levels are being plotted).
Open the Strategy Builder settings and scroll down to "CONDITION SETUP"; input the signals from the external indicator.
Configure the exit conditions, add in the TP/SL levels from the external indicator, and add an additional exit condition → {{Opposite Direction}} Entry Trigger.
After configuring the entry and exit conditions, the strategy should now be running. You can view information on the strategy in TradingView's backtesting report and also in the Strategy Builder's information table (default top right corner).
It is important to note that the strategy provided above is just an example, and the complexity of possible strategies stretches beyond what was shown in this short demonstration. Always incorporate proper risk management and ensure thorough testing before trading with live capital.
Spread Mean Reversion Strategy [SciQua]╭───────────────────────────────────────╮
Spread Mean Reversion Strategy
╰───────────────────────────────────────╯
This invite-only futures spread strategy applies a statistical mean reversion framework, executing limit orders exclusively at calculated Z-score thresholds for precise, rules-based entries and exits. It is designed for CME-style spreads and synthetic instruments with well-defined reversion tendencies.
╭────────────╮
Core Concept
╰────────────╯
The strategy calculates a rolling mean and standard deviation of a chosen spread or synthetic price series, then computes the Z-score to measure deviation from the mean in standard deviation units.
Long entries trigger when Z crosses upward through a negative entry threshold (`-devEnter`). A buy limit is placed exactly at the price corresponding to that Z-score, optionally offset by a configurable tick amount.
Short entries trigger when Z crosses downward through a positive entry threshold (`+devEnter`). A sell limit is placed at the corresponding threshold price, also with optional offset.
Exits use the same threshold method, with an independent `Close Limit Offset` to fine-tune exit placement.
╭────────────╮
Key Features
╰────────────╯
Persistence filter – Requires the Z-score to remain beyond threshold for a configurable number of bars before entry.
Cooldown after exits – Prevents immediate re-entry to reduce over-trading.
Daily and weekend flattening – Force-flattens positions via limit orders before exchange maintenance breaks and weekend closes.
Auto-rollover detection with persistence – Detects when the second contract month’s daily volume exceeds the first for a set number of days, then blocks new entries (optional).
Configurable tick offsets – Independently adjust entry and exit levels relative to threshold prices.
Minimum spread width filter – Blocks trades when long/short entry thresholds are too close together.
Contract multiplier override – Allows correct sizing for synthetic symbols where `syminfo.pointvalue` is incorrect or missing.
Limit-only execution – All entries, exits, and forced-flat actions are executed with limit orders for price control.
╭────────────────────╮
Entry Blocking Rules
╰────────────────────╯
New trades are blocked:
During daily maintenance break pre-windows
During weekend close pre-windows
After rollover triggers, if `Block After Roll` is enabled
╭────────────────────────╮
Intended Markets & Usage
╰────────────────────────╯
Built for futures spreads and synthetic instruments , including calendar spreads.
Performs best in markets with clear seasonal or statistical mean-reverting tendencies.
Not designed for strongly trending, non-reverting markets.
╭──────────────────────────╮
Risk Management & Defaults
╰──────────────────────────╯
Fixed default position size of 1 contract (qty calc function available for customization).
Realistic commission and slippage assumptions pre-set.
Pyramiding disabled by default.
Default Z-score levels: Entry at ±2.0, Exit at ±0.5.
Separate tick offset controls for entries and exits.
Note: This strategy is for research and backtesting purposes only. Past performance does not guarantee future results. All use is subject to explicit written permission from the author.
Market Open Impulse [LuciTech]Market Open Impulse Strategy
The Market Open Impulse Strategy is designed to capture significant price movements that occur at market open (2:30 PM UK time). This strategy identifies impulsive candles with high volatility and enters trades based on the direction and strength of the initial market reaction.
How It Works:
The strategy activates exclusively at 2:30 PM UK time during market open sessions. It uses ATR-based volatility filtering to identify impulsive candles that exceed a configurable multiplier (default 1.5x ATR). Long entries are triggered when an impulsive candle closes above its midpoint and above the opening price, while short entries occur when an impulsive candle closes below its midpoint and below the opening price.
Risk management is handled through precise stop loss placement at the opposite extreme of the impulse candle (high for short positions, low for long positions). Take profit levels are calculated using a configurable risk-reward ratio with a default setting of 3:1. Position sizing is automatically calculated based on the percentage risk per trade, and an optional breakeven feature can move the stop loss to the entry price at specified profit levels.
The strategy incorporates time-based filtering to ensure trades only occur during the specified market open window. Visual indicators highlight qualifying impulsive candles and plot all entry and exit levels for clear trade management. The system offers flexible risk management with customizable risk percentage, risk-reward ratios, and breakeven settings, along with multiple stop loss calculation methods including both ATR-based and candle-based options.
Key Parameters:
Market open timing is fully configurable through hour and minute settings for strategy activation. The impulse ATR multiple sets the minimum volatility threshold required for trade qualification, with visual highlighting available for qualifying setups. Risk management parameters include the percentage of account equity to risk per trade, target profit multiples relative to initial risk, and the profit level threshold for breakeven stop loss adjustment. Users can choose between ATR-based or candle-based stop loss calculation methods and adjust technical parameters for volatility calculation including ATR length and smoothing methods.
Applications:
This strategy is particularly effective for trading market open volatility and momentum, capturing institutional order flow during key timing windows, executing short-term swing trades on significant price impulses, and trading markets with predictable opening patterns and consistent volatility characteristics.