OPEN-SOURCE SCRIPT
Güncellendi

Canuck Trading Traders Strategy [Candle Entropy Edition]

502
Canuck Trading Traders Strategy: A Unique Entropy-Based Day Trading System for Volatile Stocks

Overview

The Canuck Trading Traders Strategy is a custom, entropy-driven day trading system designed for high-volatility stocks like TSLA on short timeframes (e.g., 15m). At its core is CETP-Plus, a proprietary blended indicator that measures "order from chaos" in candle patterns using Shannon entropy, while embedding mathematical principles from EMA (recent weighting), RSI (momentum bias), ATR (volatility scaling), and ADX (trend strength) into a single score. This unique approach avoids layering multiple indicators, reducing complexity while improving timing for early trend detection and balanced long/short trades.

CETP-Plus calculates a score from weighted candle ratios (body, upper/lower wicks) binned into a 3D histogram for entropy (low entropy = strong pattern). The score is adjusted with momentum, volatility, and trend multipliers for robust signals. Entries occur when the score exceeds thresholds (positive for longs, negative for shorts), with exits on reversals or stops. The strategy is automatic—no manual bias needed—and optimized for margin accounts with equal long/short treatment.

Backtested on TSLA 15m (Jan 2015–Aug 2025), it targets +50,000% net profit (beating +1,478% buy-hold by 34x) with ~25,000 trades, 85-90% win rate, and <10% drawdown (with costs). Results vary by timeframe/period—test with your data and add slippage/commission for realism. Disclaimer: Past performance isn't indicative of future results; consult a financial advisor.

Key Features

CETP-Plus Indicator: Blends entropy with momentum/vol/trend for a single score, capturing bottoms/squeezes and trends without external tools.
Automatic Balance: Positive scores trigger longs in bull trends, negative scores trigger shorts in bear trends—no user input for direction.
Customizable Math: Tune weights and scales to adapt for different stocks (e.g., lower thresholds for NVDA's smoother trends).
Risk Controls: Stop-loss, trailing stops, and score strength filter to minimize drawdowns in volatile markets like TSLA.
Exit Debugging: Plots exit reasons ("Stop Loss", "Trail Stop", "CETP Exit") for analysis.

Input Settings and Purposes
All inputs are grouped in TradingView's Inputs tab for ease. Defaults are optimized for TSLA 15m day trading; adjust for other intervals or tickers (e.g., increase window for 1h, lower thresholds for NVDA).
CETP-Plus Settings

CETP Window (default: 5, min: 3, max: 20): Lookback bars for entropy/momentum. Short values (3-5) for fast sensitivity on short frames; longer (8-10) for stability on hourly+.
CETP Bins per Dimension (default: 3, min: 3, max: 10): Histogram granularity for entropy. Low (3) for speed/simple patterns; high (5+) for detail in complex markets.
Long Threshold (default: 0.15, min: 0.1, max: 0.8, step: 0.05): CETP score for long entries. Lower (0.1) for more longs in mild bull trends; higher (0.2) to filter noise.
Short Threshold (default: -0.05, min: -0.8, max: -0.1, step: 0.05): CETP score for short entries. Less negative (-0.05) for more shorts in mild bear trends; more negative (-0.2) for strong signals.
CETP Momentum Weight (default: 0.8, min: 0.1, max: 1.0, step: 0.1): Emphasizes momentum in score. High (0.9) for aggressive in fast moves; low (0.5) for entropy focus.
Momentum Scale (default: 1.6, min: 0.1, max: 2.0, step: 0.1): Amplifies momentum. High (2.0) for short intervals; low (1.0) for stability.
Body Ratio Weight (default: 1.2, min: 0.0, max: 2.0, step: 0.1): Weights candle body in entropy (trend focus). High (1.5) for strong trends; low (0.8) for wick emphasis.
Upper Wick Ratio Weight (default: 0.8, min: 0.0, max: 2.0, step: 0.1): Weights upper wick (reversal noise). Low (0.5) to reduce false ups.
Lower Wick Ratio Weight (default: 0.8, min: 0.0, max: 2.0, step=0.1): Weights lower wick. Low (0.5) to reduce false downs.

Trade Settings

Confirmation Bars (default: 0, min: 0, max: 5): Bars for sustained CETP signals. 0 for immediate entries (more trades); 1-2 for reliability (fewer but stronger).
Min CETP Score Strength (default: 0.04, min: 0.0, max: 0.5, step: 0.05): Min absolute score for entry. Low (0.04) for more trades; high (0.15) for quality.

Risk Management

Stop Loss (%) (default: 0.5, min: 0.1, max: 5.0, step: 0.1): % from entry for stop. Tight (0.4) for quick exits; wide (0.8) for trends.
ATR Multiplier (default: 1.5, min: 0.5, max: 3.0, step: 0.1): Scales ATR for stops/trails. Low (1.0) for tight; high (2.0) for room.
Trailing ATR Mult (default: 3.5, min: 0.5, max: 5.0, step: 0.1): ATR mult for trails. High (4.0) for longer holds; low (2.0) for profits.
Trail Start Offset (%) (default: 1.0, min: 0.5, max: 2.0, step: 0.1): % profit before trailing. Low (0.8) for early lock-in; high (1.5) for bigger moves.

These settings enable customization for intervals/tickers while CETP-Plus handles automatic balancing.

Risk Disclosure

Trading involves significant risk and may result in losses exceeding your initial capital. The Canuck Trading Trader Strategy is provided for educational and informational purposes only. Users are responsible for their own trading decisions and should conduct thorough testing before using in live markets. The strategy’s high trade frequency requires reliable execution infrastructure to minimize slippage and latency.
Sürüm Notları
Bug fixes.
Sürüm Notları
Bug fixes and improvements.

- Added fix to address tiny trades from happening with lower price moving tickers with minimum price move filter to ensure current candle has enough range to justify a trade whiel the historical window confirms the trends strength reducing scalping on insignificant moves.
Sürüm Notları
Bug fixes

- Introduced a volume threshold and mulitiper for balancing noisy equities and crypto trading.
Sürüm Notları
Minor configuration changes for minimum and step up/downs.
Sürüm Notları
Bug fixes
- Added time boxing support for equities and crypto trading.
Sürüm Notları
Breaking changes:

- removed time boxing - turn bot off/on if desired in alerts.
- improved automatic trend detection based
- added bar holds to reduce trade redirection
- added short stop loss
Sürüm Notları
Added back time boxing to give users a choice to trade during regular or extended hours as a controlled trading strategy to avoid configuring too many alerts and forcing trade closures if necessary.
Sürüm Notları
Scraped session manager, as this was causing intraday issues with trades not taking place at market open missing lots of potential upside.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.