INVITE-ONLY SCRIPT
QuantMotions - TPR Sentinel

QuantMotions – TPR Sentinel
The TPR Sentinel Band is a full trade-assistant for discretionary traders.
It combines an adaptive trend engine, directional TPR logic, volume intelligence, ATR-based risk management, a brute-force parameter optimizer, and a modern on-chart UI (entries/TP/SL panel + stats). The goal: fewer fake flips, clearer trend shifts, and visually guided trade management.
1. Core Concept
The Sentinel Line is built from a blend of:
- SMA + EMA
- Midline of highest/lowest high/low (Kijun-style)
- Donchian-style mid close
On top of that, the script calculates a Directional TPR (Time-Price-Ratio):
- Short / medium / long slopes of price
- Normalized by ATR
- Converted into a trend state:
+1 = Uptrend
-1 = Downtrend
0 = Neutral / transition
Hysteresis (Flux) controls how easily the trend flips:
- Higher hysteresis → harder to reverse → fewer fake-outs in chop.
2. Signals, Filters & Volume Intelligence
Signals
- Trend Flip Long: TrendState changes from −1/0 → +1.
- Trend Flip Short: TrendState changes from +1/0 → −1.
Filters
- ADX Filter (optional):
- Only allows trades if ADX is above a chosen threshold.
- Avoids trading in flat, low-energy markets.
R:R Filter:
- Before any signal is accepted, the script checks whether the distance to TP1 is at least the configured Risk:Reward ratio relative to the distance to SL.
- Only if that minimum R:R is reached, a signal becomes valid.
Volume Intelligence & Clouds
- Aggregates up/down volume (optionally across multiple tickers you define).
- Builds Volume Clouds around the Sentinel Line:
a) Positive intensity → buying pressure (bullish cloud).
b) Negative intensity → selling pressure (bearish cloud).
Optional Volume Direction Filter:
- Long only when volume intensity ≥ 0.
- Short only when volume intensity ≤ 0.
3. Risk, Exits & Trailing Stop
The indicator includes a complete exit framework (for visual/manual trading):
Stop Loss Modes
- ATR Fixed: SL placed at a fixed ATR multiple from the entry.
- Trend Line (Dynamic): SL placed directly on the Sentinel Band (structural stop).
Take Profits
- TP1 – “safe target”:
a) Based on ATR distance.
b) Closes a configurable percentage of the position (e.g., 50%).
- TP2 (optional):
Second fixed target used only when Trailing Stop is OFF.
- Trend Runner Mode (Use TP = OFF):
Ignores fixed TP levels and rides the trend until the trend state flips.
Trailing Stop
- Activates after TP1 is hit (if enabled).
- Moves with price at a configurable ATR distance:
a) Long: trail creeps up under price.
b) Short: trail creeps down above price.
- Visually plotted as a purple trail line, dynamically replacing the original SL as the effective exit point.
Each trade is tracked internally and drawn as a green/red box with PnL labels between entry and exit.
4. UI & Stats
Candle Coloring (TRON Theme)
- Cyan = active uptrend & valid environment.
- Orange = active downtrend & valid environment.
Modern Trade Panel (on last bar)
- Live overlay of:
a) Entry
b) TP1
c) TP2
d) SL or active Trail (with dynamic label text: “SL (ATR)”, “SL (Struct)”, “TRAIL”)
Info label shows:
- Historical win rate in the current direction (Long/Short).
- Distance to SL, TP1, TP2 from current price.
- Box color blends from red → green depending on whether price is closer to SL or TP.
Stats Table (Bottom Right)
- Separate stats for Long and Short trades:
a) Win rate (%)
b) Cumulative PnL
Alerts
- Generates JSON alerts on signals, for example: {"side":"buy","ticker":"XYZ","price":123.45}
Perfect for webhooks, bots, or external automation.
5. Brute Force Optimizer (TPR Lab) – Important Limitations
The built-in Optimizer is a numerical helper, not a full strategy optimizer.
What it does:
- Runs brute-force simulations over a sliding window of historical data.
- Scans user-defined ranges for:
- Best Period (“Best Cycle”)
- Best Hysteresis (“Best Flux”)
Uses an efficiency score (average profit per trade) to rank combinations.
Displays results in the bottom-left TRON panel:
- Best Cycle
- Best Hysteresis
- Efficiency Score
What it does NOT optimize or take into account:
- It does not include your actual minimum R:R filter.
- It does not simulate or optimize your Stop Loss modes.
- It does not simulate Trailing Stops.
- It does not use the ADX filter.
- It does not use the Volume filters or Volume Clouds.
Because of this, the suggested “best” Period and Hysteresis are purely computational recommendations based on a simplified internal model.
In real trading, with your full setup (R:R filter, SL mode, Trailing, ADX, Volume confirmation, personal style), other parameter combinations can be superior to what the Optimizer suggests.
You should treat the Optimizer as:
A starting point or a research tool, not the final truth.
Always validate its suggestions visually, in the context of your full system and risk management.
6. Practical Usage
- Works on FX, indices, crypto, commodities – anything with decent liquidity.
- Scalping → use lower Period values, higher responsiveness.
- Swing → use higher Period values, more stability.
Recommended:
- Keep ADX filter ON to avoid dead markets.
- Use Volume Clouds as directional bias.
- Use the Info Panel and Stats to align with your own R:R and risk rules.
Disclaimer
This script is for educational/analytical purposes only and does not constitute financial advice. It does not execute trades or manage your risk automatically. Always combine it with your own strategy, money management, and independent decision-making.
Use the Info Panel and Stats to align with your own R:R and risk rules.
The TPR Sentinel Band is a full trade-assistant for discretionary traders.
It combines an adaptive trend engine, directional TPR logic, volume intelligence, ATR-based risk management, a brute-force parameter optimizer, and a modern on-chart UI (entries/TP/SL panel + stats). The goal: fewer fake flips, clearer trend shifts, and visually guided trade management.
1. Core Concept
The Sentinel Line is built from a blend of:
- SMA + EMA
- Midline of highest/lowest high/low (Kijun-style)
- Donchian-style mid close
On top of that, the script calculates a Directional TPR (Time-Price-Ratio):
- Short / medium / long slopes of price
- Normalized by ATR
- Converted into a trend state:
+1 = Uptrend
-1 = Downtrend
0 = Neutral / transition
Hysteresis (Flux) controls how easily the trend flips:
- Higher hysteresis → harder to reverse → fewer fake-outs in chop.
2. Signals, Filters & Volume Intelligence
Signals
- Trend Flip Long: TrendState changes from −1/0 → +1.
- Trend Flip Short: TrendState changes from +1/0 → −1.
Filters
- ADX Filter (optional):
- Only allows trades if ADX is above a chosen threshold.
- Avoids trading in flat, low-energy markets.
R:R Filter:
- Before any signal is accepted, the script checks whether the distance to TP1 is at least the configured Risk:Reward ratio relative to the distance to SL.
- Only if that minimum R:R is reached, a signal becomes valid.
Volume Intelligence & Clouds
- Aggregates up/down volume (optionally across multiple tickers you define).
- Builds Volume Clouds around the Sentinel Line:
a) Positive intensity → buying pressure (bullish cloud).
b) Negative intensity → selling pressure (bearish cloud).
Optional Volume Direction Filter:
- Long only when volume intensity ≥ 0.
- Short only when volume intensity ≤ 0.
3. Risk, Exits & Trailing Stop
The indicator includes a complete exit framework (for visual/manual trading):
Stop Loss Modes
- ATR Fixed: SL placed at a fixed ATR multiple from the entry.
- Trend Line (Dynamic): SL placed directly on the Sentinel Band (structural stop).
Take Profits
- TP1 – “safe target”:
a) Based on ATR distance.
b) Closes a configurable percentage of the position (e.g., 50%).
- TP2 (optional):
Second fixed target used only when Trailing Stop is OFF.
- Trend Runner Mode (Use TP = OFF):
Ignores fixed TP levels and rides the trend until the trend state flips.
Trailing Stop
- Activates after TP1 is hit (if enabled).
- Moves with price at a configurable ATR distance:
a) Long: trail creeps up under price.
b) Short: trail creeps down above price.
- Visually plotted as a purple trail line, dynamically replacing the original SL as the effective exit point.
Each trade is tracked internally and drawn as a green/red box with PnL labels between entry and exit.
4. UI & Stats
Candle Coloring (TRON Theme)
- Cyan = active uptrend & valid environment.
- Orange = active downtrend & valid environment.
Modern Trade Panel (on last bar)
- Live overlay of:
a) Entry
b) TP1
c) TP2
d) SL or active Trail (with dynamic label text: “SL (ATR)”, “SL (Struct)”, “TRAIL”)
Info label shows:
- Historical win rate in the current direction (Long/Short).
- Distance to SL, TP1, TP2 from current price.
- Box color blends from red → green depending on whether price is closer to SL or TP.
Stats Table (Bottom Right)
- Separate stats for Long and Short trades:
a) Win rate (%)
b) Cumulative PnL
Alerts
- Generates JSON alerts on signals, for example: {"side":"buy","ticker":"XYZ","price":123.45}
Perfect for webhooks, bots, or external automation.
5. Brute Force Optimizer (TPR Lab) – Important Limitations
The built-in Optimizer is a numerical helper, not a full strategy optimizer.
What it does:
- Runs brute-force simulations over a sliding window of historical data.
- Scans user-defined ranges for:
- Best Period (“Best Cycle”)
- Best Hysteresis (“Best Flux”)
Uses an efficiency score (average profit per trade) to rank combinations.
Displays results in the bottom-left TRON panel:
- Best Cycle
- Best Hysteresis
- Efficiency Score
What it does NOT optimize or take into account:
- It does not include your actual minimum R:R filter.
- It does not simulate or optimize your Stop Loss modes.
- It does not simulate Trailing Stops.
- It does not use the ADX filter.
- It does not use the Volume filters or Volume Clouds.
Because of this, the suggested “best” Period and Hysteresis are purely computational recommendations based on a simplified internal model.
In real trading, with your full setup (R:R filter, SL mode, Trailing, ADX, Volume confirmation, personal style), other parameter combinations can be superior to what the Optimizer suggests.
You should treat the Optimizer as:
A starting point or a research tool, not the final truth.
Always validate its suggestions visually, in the context of your full system and risk management.
6. Practical Usage
- Works on FX, indices, crypto, commodities – anything with decent liquidity.
- Scalping → use lower Period values, higher responsiveness.
- Swing → use higher Period values, more stability.
Recommended:
- Keep ADX filter ON to avoid dead markets.
- Use Volume Clouds as directional bias.
- Use the Info Panel and Stats to align with your own R:R and risk rules.
Disclaimer
This script is for educational/analytical purposes only and does not constitute financial advice. It does not execute trades or manage your risk automatically. Always combine it with your own strategy, money management, and independent decision-making.
Use the Info Panel and Stats to align with your own R:R and risk rules.
仅限邀请脚本
只有作者授权的用户才能访问此脚本。您需要申请并获得使用许可。通常情况下,付款后即可获得许可。更多详情,请按照下方作者的说明操作,或直接联系Trading-Programmer。
TradingView不建议您付费购买或使用任何脚本,除非您完全信任其作者并了解其工作原理。您也可以在我们的社区脚本找到免费的开源替代方案。
作者的说明
To request access, select one of the license options:
• Monthly: https://buy.stripe.com/9B600l63P5SZae80Wtb3q06
• Yearly: https://buy.stripe.com/5kQ4gB2RDbdj71W34Bb3q05
For 3 days testing just send me a message.
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
仅限邀请脚本
只有作者授权的用户才能访问此脚本。您需要申请并获得使用许可。通常情况下,付款后即可获得许可。更多详情,请按照下方作者的说明操作,或直接联系Trading-Programmer。
TradingView不建议您付费购买或使用任何脚本,除非您完全信任其作者并了解其工作原理。您也可以在我们的社区脚本找到免费的开源替代方案。
作者的说明
To request access, select one of the license options:
• Monthly: https://buy.stripe.com/9B600l63P5SZae80Wtb3q06
• Yearly: https://buy.stripe.com/5kQ4gB2RDbdj71W34Bb3q05
For 3 days testing just send me a message.
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。