OPEN-SOURCE SCRIPT
Pro Day Trader (v7)

Pro Day Trader (v6) — Update Summary
Core behavior (unchanged by default)
EMA(9/21) + RSI(14) with HTF EMA filter.
Same alerts, plots, and session handling.
All new features are opt-in (off by default) to preserve existing signals.
New features (opt-in)
Adaptive RSI
Inputs: Use Dynamic RSI, RSI slope lookback, RSI slope relax threshold, RSI relax step.
Relaxes RSI gates slightly during strong momentum slopes.
Dynamic ATR Multiplier
Inputs: Dynamic ATR multiplier, ATR long MA length, ATR ratio low/high, Scale when below/above.
Adapts stop multiple to volatility (tightens in chop, loosens in expansions).
Entry Mode
Inputs: Entry Mode = Immediate / Pullback EMA / Pullback VWAP, Pullback wait bars (max).
Optional “arm-then-pullback” entry to improve price on signals after a valid cross.
MTF RSI Filter
Inputs: Use MTF RSI filter, MTF #1, MTF #2, MTF RSI length, MTF RSI long min / short max.
Requires 15m/60m RSI alignment with 5m entries.
DI Direction Confirmation
Input: Use DI direction confirm.
Confirms longs with +DI > −DI and shorts with −DI > +DI.
PA Gate Score
Inputs: Use PA Gate Score, PA score min (default 0.65), Near OR penalty factor, Lunch penalty factor.
Combines RVOL/ADX/penalties into one score; normalized to ≤ 1.0.
Gate mode quality-of-life
Auto gate mode retained for HTF/VWAP: Both in RTH / Either outside RTH.
Preset/EZ behavior preserved (e.g., Scalp → Either).
Risk & trail fixes
Trailing ATR persistence: resets the opposite trail on a new entry to avoid stale lines.
Dynamic ATR uses atrMultUse in stop math (targets unchanged).
Dashboard additions
Displays: PA Score & threshold, Dyn RSI thresholds, Trail ATR status, DI Confirm, Dyn ATR mult, Entry Mode, and MTF RSI status (only meaningful when features are on).
Internals / safety
Non-repainting maintained (request.security(..., lookahead_off)).
Series computed each bar (no conditional function calls).
PA Score clamped to ≤ 1.0 to prevent over-weighting single factors in high-RVOL regimes.
Suggested presets (optional)
Futures (MES/ES/MNQ): Gate = Auto, Use Dynamic ATR = ON, Entry = Pullback EMA, Use DI Confirm = ON.
Equities (TSLA/NVDA): Use Dynamic RSI = ON, Entry = Pullback EMA (first 60–90m RTH).
If enabling PA Score: start with PA score min = 0.65–0.75.
Core behavior (unchanged by default)
EMA(9/21) + RSI(14) with HTF EMA filter.
Same alerts, plots, and session handling.
All new features are opt-in (off by default) to preserve existing signals.
New features (opt-in)
Adaptive RSI
Inputs: Use Dynamic RSI, RSI slope lookback, RSI slope relax threshold, RSI relax step.
Relaxes RSI gates slightly during strong momentum slopes.
Dynamic ATR Multiplier
Inputs: Dynamic ATR multiplier, ATR long MA length, ATR ratio low/high, Scale when below/above.
Adapts stop multiple to volatility (tightens in chop, loosens in expansions).
Entry Mode
Inputs: Entry Mode = Immediate / Pullback EMA / Pullback VWAP, Pullback wait bars (max).
Optional “arm-then-pullback” entry to improve price on signals after a valid cross.
MTF RSI Filter
Inputs: Use MTF RSI filter, MTF #1, MTF #2, MTF RSI length, MTF RSI long min / short max.
Requires 15m/60m RSI alignment with 5m entries.
DI Direction Confirmation
Input: Use DI direction confirm.
Confirms longs with +DI > −DI and shorts with −DI > +DI.
PA Gate Score
Inputs: Use PA Gate Score, PA score min (default 0.65), Near OR penalty factor, Lunch penalty factor.
Combines RVOL/ADX/penalties into one score; normalized to ≤ 1.0.
Gate mode quality-of-life
Auto gate mode retained for HTF/VWAP: Both in RTH / Either outside RTH.
Preset/EZ behavior preserved (e.g., Scalp → Either).
Risk & trail fixes
Trailing ATR persistence: resets the opposite trail on a new entry to avoid stale lines.
Dynamic ATR uses atrMultUse in stop math (targets unchanged).
Dashboard additions
Displays: PA Score & threshold, Dyn RSI thresholds, Trail ATR status, DI Confirm, Dyn ATR mult, Entry Mode, and MTF RSI status (only meaningful when features are on).
Internals / safety
Non-repainting maintained (request.security(..., lookahead_off)).
Series computed each bar (no conditional function calls).
PA Score clamped to ≤ 1.0 to prevent over-weighting single factors in high-RVOL regimes.
Suggested presets (optional)
Futures (MES/ES/MNQ): Gate = Auto, Use Dynamic ATR = ON, Entry = Pullback EMA, Use DI Confirm = ON.
Equities (TSLA/NVDA): Use Dynamic RSI = ON, Entry = Pullback EMA (first 60–90m RTH).
If enabling PA Score: start with PA score min = 0.65–0.75.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.