OPEN-SOURCE SCRIPT
Strategy 461 - TS M15

Strategy 461 is a short-term price action strategy designed for XAUUSD on the 15-minute timeframe.
The strategy is based on a clean liquidity sweep / TS pattern. It looks for situations where the current candle takes liquidity from the previous candle, rejects that move, and closes back with directional strength.
Core Idea
The strategy tries to capture short-term reversals after a liquidity sweep.
A bullish setup appears when:
The previous candle is bearish.
The current candle sweeps the previous low.
The current candle does not sweep the previous high.
The current candle closes bullish.
Price closes back above the previous low.
A bearish setup appears when:
The previous candle is bullish.
The current candle sweeps the previous high.
The current candle does not sweep the previous low.
The current candle closes bearish.
Price closes back below the previous high.
Trend Filter
The strategy includes an optional EMA200 bias filter:
Long trades are only allowed when price is above the EMA200.
Short trades are only allowed when price is below the EMA200.
This filter is intended to reduce counter-trend entries and improve signal quality.
Risk Management
Each trade uses a fixed Risk-to-Reward target.
Stop Loss is placed beyond the sweep candle extreme.
A configurable tick buffer is added beyond the wick.
Take Profit is calculated using the selected RR multiple.
The RR target can be adjusted from 1:1 upward.
Example:
RR Target = 1.0 means 1:1.
RR Target = 1.5 means 1:1.5.
RR Target = 2.0 means 1:2.
Recommended Market
Symbol: XAUUSD
Timeframe: 15 minutes
Market type: Gold / Spot Gold / CFD Gold, depending on broker data.
Main Inputs
RR Target: Defines the take-profit distance relative to risk.
Buffer SL in ticks: Adds extra distance beyond the sweep wick.
EMA Bias Length: Default trend filter length.
Use EMA200 Filter: Enables or disables directional bias.
Session Filter: Optional trading session filter.
Show EMA200: Displays the trend filter line.
Exit Logic
Positions are closed automatically by:
Stop Loss.
Take Profit based on the selected RR.
The strategy does not use trailing stops or discretionary exits.
Notes
This is a simple and direct liquidity-sweep model. It is not designed to catch every move, but to identify clean rejection patterns with predefined risk.
Performance may vary depending on broker feed, spread, commission, trading session, and execution quality. It is recommended to test different RR values, SL buffers, and session filters before using it in live trading.
This script is intended for research, backtesting, and educational purposes only.
The strategy is based on a clean liquidity sweep / TS pattern. It looks for situations where the current candle takes liquidity from the previous candle, rejects that move, and closes back with directional strength.
Core Idea
The strategy tries to capture short-term reversals after a liquidity sweep.
A bullish setup appears when:
The previous candle is bearish.
The current candle sweeps the previous low.
The current candle does not sweep the previous high.
The current candle closes bullish.
Price closes back above the previous low.
A bearish setup appears when:
The previous candle is bullish.
The current candle sweeps the previous high.
The current candle does not sweep the previous low.
The current candle closes bearish.
Price closes back below the previous high.
Trend Filter
The strategy includes an optional EMA200 bias filter:
Long trades are only allowed when price is above the EMA200.
Short trades are only allowed when price is below the EMA200.
This filter is intended to reduce counter-trend entries and improve signal quality.
Risk Management
Each trade uses a fixed Risk-to-Reward target.
Stop Loss is placed beyond the sweep candle extreme.
A configurable tick buffer is added beyond the wick.
Take Profit is calculated using the selected RR multiple.
The RR target can be adjusted from 1:1 upward.
Example:
RR Target = 1.0 means 1:1.
RR Target = 1.5 means 1:1.5.
RR Target = 2.0 means 1:2.
Recommended Market
Symbol: XAUUSD
Timeframe: 15 minutes
Market type: Gold / Spot Gold / CFD Gold, depending on broker data.
Main Inputs
RR Target: Defines the take-profit distance relative to risk.
Buffer SL in ticks: Adds extra distance beyond the sweep wick.
EMA Bias Length: Default trend filter length.
Use EMA200 Filter: Enables or disables directional bias.
Session Filter: Optional trading session filter.
Show EMA200: Displays the trend filter line.
Exit Logic
Positions are closed automatically by:
Stop Loss.
Take Profit based on the selected RR.
The strategy does not use trailing stops or discretionary exits.
Notes
This is a simple and direct liquidity-sweep model. It is not designed to catch every move, but to identify clean rejection patterns with predefined risk.
Performance may vary depending on broker feed, spread, commission, trading session, and execution quality. It is recommended to test different RR values, SL buffers, and session filters before using it in live trading.
This script is intended for research, backtesting, and educational purposes only.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.