OPEN-SOURCE SCRIPT
ที่อัปเดต:

Sentry Mode: Dynamic Trend & Exit System

672
Sentry Mode is designed for traders who prioritize risk management and structural trend alignment. It eliminates the guesswork of "How much should I buy?" by calculating your exact share count based on a live-tracking stop loss.

Core Features
1. The Sentry Position Manager (Quantitative Table)
The centerpiece of this script is a real-time data table that calculates:

Target vs. Actual Risk: Sees the gap between your desired equity risk and the actual dollar amount at stake after share rounding.

Dynamic Stop (Ribbon Top): The stop loss isn't a fixed percentage; it tracks the Low of the leading Moving Average in the ribbon, providing a "trailing floor."

Position Sizing: Automatically calculates shares based on your Account Size and Max Position % cap.

Invalid Price Filter: The Sentry will reject trade calculations (showing "PRICE BELOW STOP") if the asset is currently trading below the structural floor.

2. Structural Trend Ribbon
5-MA Cluster: Uses up to five user-selectable Moving Averages (SMA, EMA, WMA, etc.) to visualize trend strength.

Ribbon Top Analysis: Automatically identifies the "Fastest" MA to set the current trend boundary.

3rd MA Floor: Identifies the "meat" of the trend, serving as a secondary structural exit for trailing stops.

3. Multi-Timeframe Pivot Analysis
The script identifies and draws institutional-grade levels:

52-Week Highs: Tracks and extends 52-week highs with automated "Broken Line" logic when price clears the level.

Multi-Day Pivots: Visualizes 5-day, 9-day, 19-day, and 90-day pivot highs to identify supply zones and breakout entries.

Downtrend Resistance: Automatically plots 19-bar downward trendlines to identify "Cheat" entries and downtrend breaks.

4. SPY Market Context Filter
Broad Market Alignment: Includes a background color filter based on SPY (S&P 500) trend health.

ATR Volatility Scaling: The background changes intensity (L1, L2, L3) based on SPY’s ATR, warning you when the broad market is undergoing a "normal pullback" versus a "high-volatility breakdown."

4. How to Use
Define your Bankroll: In the settings, input your total Account Size and the percentage of equity you are willing to risk per trade (e.g., 0.25%).

Confirm the Trend: Look for price to be above the Ribbon Top. Ensure the SPY Context background is green.

Execute via Sentry Table: Read the "Shares" and "Pos Size" directly from the on-screen table.

Manage the Exit: The red dashed Sentry Line shows your floor. If price closes below this line (or the 3rd MA), the trend structure is broken.

5. Technical Details (For the Sidebar)
Signal Type: Trend-Following / Momentum.

Release Note
Added Alerts for different conditions
Added Reference stop and target levels with price and % for better visuals of risk reward from Buy alert
It will work on Pine screener
Release Note
Updated to remove extra plots, improvements to use pine screener export for portfolio approach. like, if you use sma50 for stop loss, then screen your portfolio watchlist and export the results for position size dollar risk and other parameters to excel and check how much are you invested if you are using this risk management approach and open portfolio heat.
Release Note
Added Two Alerts
If used on pine screener you stocks which are strong in strong market and strong in week market.
Sentry: Trend Strong With Market
Sentry: Trend Strong Against Market
Release Note
Priming Bars Breaking up and Breaking Down label added.
Release Note
Position Management table updated to reflect stat of current bar
Release Note
Few updates for better code
Release Note
Updated few things
Release Note
Mini Coil update
Release Note
Coil logic update
Release Note
Addition of 19 Day Low Pivot Line
Release Note
Fixed typo 19 , earlier it was 9 for 19 day pivot low.
Release Note
Added Base Pivots

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน