LinReg Scale-In Strategy by p_zerbst
By p_zerbst
Performance Metrics
- Author: p_zerbst
- Symbol: CME_MINI:ES1!
- Timeframe: 1 day
- Net P&L: +473,325.00 USD (+464.24%)
- Win Rate: 47.0%
- Profit Factor: 1.913
- Max Drawdown: 87,587.50 USD (42.47%)
- Total Trades: 432
Description
This strategy is based on an basic LinReg concept. Instead of using traditional price levels or moving averages, it uses the Linear Regression Correlation Coefficient (Pearson's r) to measure the actual strength of a trend and dynamically build up a position.How it works:The indicator calculates how closely the price follows a linear trend, returning a value between -1 and +1. Scale-In (Entries): The strategy enters a Long position step-by-step as the uptrend gains momentum. It adds to the position when the coefficient crosses above the 0.25, 0.50, and 0.75 thresholds (pyramiding up to 3 times). Scale-Out (Exit): Following the "let profits run but cut losses quick" mentality, the strategy closes the entire position as soon as the trend starts dying out and the coefficient crosses back down below 0.25.Setup Tip: It is recommended using this approach on commodities using the Daily timeframe. The strategy is set to fixed contracts by default to allow smooth backtesting on futures like NQ or ES without running into margin limits.Disclaimer:This script is published for educational and testing purposes only. It does not constitute financial advice. Trading futures and other financial instruments involves significant risk of loss. Past performance is not indicative of future results. Always do your own research and backtesting before risking real capital.