OPEN-SOURCE SCRIPT
[COG] Platypus

[COG] Platypus
Overview
Platypus is a volume momentum indicator that combines price action, volume analysis, and multi-timeframe confirmation to generate trade signals. Unlike traditional volume indicators, Platypus reconstructs volume momentum by factoring in price velocity, volatility adjustment, and market structure to identify true institutional momentum shifts.
The indicator features a comprehensive filtering system including EMA alignment, background state confirmation, and optional multi-timeframe filters to eliminate false signals and ensure you only trade with the strongest momentum.
Key Features
✅ Volume Momentum Calculation
Volatility-Adjusted Volume: Normalizes volume relative to recent volatility periods
Quiet Market Filtering: Reduces noise during low-activity periods
Spike Detection: Identifies abnormal volume surges with boosted weighting
Momentum Smoothing: EMA-based smoothing prevents erratic signals
✅ Entry Pattern Detection
3-Bar Pattern Requirement: RED → GREEN → GREEN for buys (opposite for sells)
State Management: Prevents consecutive signals in same direction without reset
Background Confirmation: Must align with bullish/bearish market state
EMA Alignment Filter: Ensures trend structure supports the trade direction
✅ Multi-Timeframe Filtering System
HTF Closed Bar Filter: Confirms last closed higher timeframe bar matches direction (no repaint)
HTF Momentum Filter: Requires current HTF bar to match direction (live, prevents delayed entries)
Dual-Filter Capability: Use both filters for maximum precision
✅ Dashboard
Real-time Status Monitoring: Volume trend, background state, EMA order, trade state
Filter Status Display: Shows HTF filter conditions and signal permission
Pattern Detection: Indicates when 3-bar entry pattern is forming
✅ On-Chart Integration
50/100/200 EMAs: Automatically plotted on price chart with customizable colors
Visual Entry Markers: Triangle signals appear on price chart at entry points
Signal Alerts: Built-in alert conditions for all signal types
📚 Core Settings Explained
Pine Script®
Signal Period (Default: 8): Controls the smoothing of the signal line (blue line). Lower values = more responsive, higher values = smoother but slower to react.
Pine Script®
Volatility Period (Default: 20): Lookback period for volume and price range calculations. This period is used to normalize volume relative to recent market conditions.
Pine Script®
Price Filter MA Length (Default: 200): The SMA period used for background state determination. Price must be above this MA for bullish background, below for bearish background.
Advanced Settings
Pine Script®
Momentum Multiplier (Default: 50.0): Scales the final momentum score. Higher values = larger histogram bars and more sensitivity. Adjust based on your instrument's volatility.
Pine Script®
Momentum Smoothing (Default: 4): EMA period applied to raw momentum before normalization. Higher values reduce noise but add lag.
Pine Script®
Quiet Market Filter (Default: 0.3): During low-volume periods, this applies exponential dampening to momentum. Higher values = more aggressive filtering of weak moves.
Pine Script®
When volume is less than average + threshold, it squares the ratio (dampening), otherwise uses linear scaling.
Overview
Platypus is a volume momentum indicator that combines price action, volume analysis, and multi-timeframe confirmation to generate trade signals. Unlike traditional volume indicators, Platypus reconstructs volume momentum by factoring in price velocity, volatility adjustment, and market structure to identify true institutional momentum shifts.
The indicator features a comprehensive filtering system including EMA alignment, background state confirmation, and optional multi-timeframe filters to eliminate false signals and ensure you only trade with the strongest momentum.
Key Features
✅ Volume Momentum Calculation
Volatility-Adjusted Volume: Normalizes volume relative to recent volatility periods
Quiet Market Filtering: Reduces noise during low-activity periods
Spike Detection: Identifies abnormal volume surges with boosted weighting
Momentum Smoothing: EMA-based smoothing prevents erratic signals
✅ Entry Pattern Detection
3-Bar Pattern Requirement: RED → GREEN → GREEN for buys (opposite for sells)
State Management: Prevents consecutive signals in same direction without reset
Background Confirmation: Must align with bullish/bearish market state
EMA Alignment Filter: Ensures trend structure supports the trade direction
✅ Multi-Timeframe Filtering System
HTF Closed Bar Filter: Confirms last closed higher timeframe bar matches direction (no repaint)
HTF Momentum Filter: Requires current HTF bar to match direction (live, prevents delayed entries)
Dual-Filter Capability: Use both filters for maximum precision
✅ Dashboard
Real-time Status Monitoring: Volume trend, background state, EMA order, trade state
Filter Status Display: Shows HTF filter conditions and signal permission
Pattern Detection: Indicates when 3-bar entry pattern is forming
✅ On-Chart Integration
50/100/200 EMAs: Automatically plotted on price chart with customizable colors
Visual Entry Markers: Triangle signals appear on price chart at entry points
Signal Alerts: Built-in alert conditions for all signal types
📚 Core Settings Explained
signalPeriod = input.int(8, "Signal Period", minval=1, group="Core Settings")
Signal Period (Default: 8): Controls the smoothing of the signal line (blue line). Lower values = more responsive, higher values = smoother but slower to react.
volatilityPeriod = input.int(20, "Volatility Period", minval=1, group="Core Settings")
Volatility Period (Default: 20): Lookback period for volume and price range calculations. This period is used to normalize volume relative to recent market conditions.
priceFilterLength = input.int(200, "Price Filter MA Length", minval=1, group="Core Settings")
Price Filter MA Length (Default: 200): The SMA period used for background state determination. Price must be above this MA for bullish background, below for bearish background.
Advanced Settings
momentumMultiplier = input.float(50.0, "Momentum Multiplier", minval=20.0, maxval=80.0, step=2.0, group="Advanced")
Momentum Multiplier (Default: 50.0): Scales the final momentum score. Higher values = larger histogram bars and more sensitivity. Adjust based on your instrument's volatility.
momentumSmoothing = input.int(4, "Momentum Smoothing", minval=1, maxval=15, group="Advanced")
Momentum Smoothing (Default: 4): EMA period applied to raw momentum before normalization. Higher values reduce noise but add lag.
quietThreshold = input.float(0.3, "Quiet Market Filter", minval=0.0, maxval=1.0, step=0.05, group="Advanced")
Quiet Market Filter (Default: 0.3): During low-volume periods, this applies exponential dampening to momentum. Higher values = more aggressive filtering of weak moves.
volStrengthFactor = volRatio < (1.0 + quietThreshold) ? math.pow(volRatio, 2) : volRatio
When volume is less than average + threshold, it squares the ratio (dampening), otherwise uses linear scaling.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
CognitiveAlpha
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
CognitiveAlpha
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.