I need a robust, fully-coded trend-following algorithm tailored for index and commodity futures. The goal is to automate short (sell-side) entries and exits, complete with risk management and position sizing logic, so I can deploy it straight into my brokerage platform without manual intervention. Core requirements • The strategy must be 100 % trend-following—no mean-reversion or arbitrage logic. • Results should be reproducible on minute-level historical data and live tick data. • All parameters (look-back, stop-loss, trail, position size) should be externally configurable so I can fine-tune them later. Deliverables 1. Clean, well-commented source code in a widely-used language for futures trading (Python, Pine Script, or similar—advise on best fit). 2. A back-test covering at least five years of continuous futures data, with summary metrics (CAGR, max drawdown, Sharpe, win/loss). 3. Forward-test demo or paper-trading proof to confirm the strategy behaves the same live. 4. Brief hand-off guide so I can tweak inputs and roll the code to new contracts myself. Acceptance criteria – Net profitability and drawdown numbers must match your back-test within a 5 % tolerance when I run the code on my own machine. – No repainting or look-ahead bias. – Execution latency under 500 ms on typical retail hardware. Timing I’m ready to start today and I need a first functional version ASAP, with a complete, tested hand-off as soon as practical. If you have a proven record building futures trend algos, let’s get this running.