Simple Symmetrical Triangle Strategy (6 points)Overview
This strategy identifies triangle patterns formed by a series of key high and low price points. A trade is triggered when the price breaks out from the pattern's final confirmation points: a buy signal occurs on a close above the last high point, and a sell signal on a close below the last low point. To ensure relevance, any pattern that doesn't break out within 10 bars is automatically discarded.
This helps filter out patterns that lose momentum and focuses only on the most imminent breakouts.
How It Works
1. Pattern Detection: The script continuously scans for a sequence of three declining highs (points H1, H2, H3) and three rising lows (points L1, L2, L3) to form a triangle.
2. Entry Logic: The logic is straightforward and based on breaking the last confirmed pivot:
* Long Entry: A buy order is executed if the price closes above the level of the last high (H3).
* Short Entry: A sell order is executed if the price closes below the level of the last low (L3).
3. Pattern Expiration: A triangle only remains "active" for 10 bars after its formation. If a breakout doesn't occur within this window, the pattern is removed from analysis, avoiding trades on prolonged, unresolved consolidations.
Key Features
* Automatic Detection: Identifies and draws triangles for you.
* Simple Breakout Logic: Easy to understand, trades by following the price action.
* Time Filter: Its main advantage is discarding patterns that do not resolve quickly.
* Customizable: You can adjust the sensitivity of the pivot detection in the settings.
Important Disclaimer
This strategy is designed as an entry system and DOES NOT INCLUDE A STOP LOSS OR TAKE PROFIT.
Automation Ready
Want to automate this or ANY strategy on your broker or MetaTrader (MT4/MT5) without keeping your computer on or needing a VPS? You can use WebhookTrade.
Indicadores y estrategias
Market Switchers Trading Bot 3 MIN ORB The Market Switchers 3-Min ORB trading bot trades breakouts after the first three minutes of the New York session (09:30–09:33 EST) by marking the high and low of that range and entering long when price breaks above the high or short when it breaks below the low. It uses fixed USD-based risk management (e.g., $500 stop loss, $1,500 take profit), converts these values to points/ticks, and allows only one trade per day. Trades are taken only after 9:30 AM, with all positions force-closed before the session ends, and alerts are included for both long and short entries. The strategy targets high-volatility moves at the open when momentum is typically strongest.
Symmetrical Triangle Strategy (Real and Trap confirmation)Overview
This is an advanced strategy that not only detects symmetrical triangle patterns but also attempts to differentiate between a genuine breakout and a false breakout (a trap) to trade accordingly.
Instead of blindly following every breakout, it analyzes the "quality" of the move using Volume and RSI filters. If the breakout appears weak, it prepares to trade in the opposite direction, capitalizing on the pattern's failure.
How It Works
The strategy employs a dual logic that activates after the price breaks the last pivot (H3 or L3):
1. Scenario A: The Real Breakout
* If the price breaks the triangle AND the breakout is confirmed by a surge in volume and/or a favorable RSI, the strategy considers the move genuine and enters in the direction of the breakout.
2. Scenario B: The False Breakout (Trap)
* If the price breaks the triangle BUT the indicators fail to confirm it (e.g., low volume), the strategy interprets it as a potential trap.
* It waits for the price to return inside the pattern.
* Once the price has re-entered, it opens a trade AGAINST the initial breakout, betting that the first move was a fake-out.
Key Features
* Hybrid Logic: It's not just a simple breakout strategy; it adapts to market conditions.
* Confirmation Filters: Uses Volume and RSI to validate the strength of a breakout (fully configurable).
* Capitalizes on Traps: Its greatest strength is the ability to identify and trade false breakouts, a common market scenario.
* Optional Confirmation: For trap trades, an extra confirmation via an EMA crossover can be enabled for added safety.
* Opportunity Timeout: Potential traps have a time limit to be confirmed, preventing the strategy from getting stuck in an undecided scenario.
Important Disclaimer
This strategy is designed as an entry system and DOES NOT INCLUDE A STOP LOSS OR TAKE PROFIT.
Automation Ready
Want to automate this or ANY strategy on your broker or MetaTrader (MT4/MT5) without keeping your computer on or needing a VPS? You can use WebhookTrade.
HAPI MA Crossover StrategyDescription:
This strategy implements a Moving Average (MA) crossover system to identify potential trend reversals and capture directional momentum. Two moving averages are calculated — a fast MA (shorter period) and a slow MA (longer period).
Long Entry: Triggered when the fast MA crosses above the slow MA, signaling a potential bullish trend shift.
Short Entry: Triggered when the fast MA crosses below the slow MA, signaling a potential bearish trend shift.
Exit Conditions: Positions are closed when an opposite crossover occurs or when an optional stop-loss/take-profit is hit (if enabled).
The fast and slow MA types (SMA, EMA, etc.) and periods are user-configurable for flexibility. This crossover method aims to capture medium-term price trends while avoiding minor price noise, making it suitable for trending market conditions.
Note: As with all crossover systems, performance may vary in ranging markets. Combining with additional filters (volume, volatility, higher timeframe trend) can improve results.
xauusd:Only suitable for 1 minute, short-term tradingxauusd
:Only suitable for 1 minute, short-term trading
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
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.
光速量化-头皮策略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.