Infinity Algo Backtest

Infinity Algo Backtest is a strategy testing system with 5 entry modes, 6 take-profit levels, and optional Auto-Tune optimization (historical simulation).
Switch between trend-following, contrarian, and sniper entries within one strategy. Auto-Tune runs historical simulations across hundreds of parameter combinations and selects the best-scoring configuration based on your chosen metric (not predictive AI).
Includes trailing stop-loss options, optional add-on entries (pyramiding), and structured alert messages for automation.
█ KEY FEATURES
- ✅ 5 Entry Modes: Normal, Smart, AI, HL Sniper, AI Sniper
- ✅ 3 Exit Modes: Percentage targets, Signal step-outs, Opposite signal flip
- ✅ 6 Take-Profit Levels with customizable partial position sizing
- ✅ Trailing Stop-Loss (None / Breakeven / Moving Target)
- ✅ Auto-Tune Optimization (Walk-Forward or Static)
- ✅ Optional add-on entries (pyramiding)
- ✅ Structured alert messages for webhook automation
- ✅ Designed for crypto, forex, stocks, indices, and commodities
█ WHAT MAKES THIS STRATEGY DIFFERENT
🧠 Auto-Tune Engine
Unlike static strategies, this system tests 500+ parameter combinations — varying sensitivity (5-28), thresholds, and trigger configs — then selects the best-scoring settings from historical simulations.
Choose from 12 scoring metrics: Sharpe Ratio, Sortino Ratio, Calmar Ratio, SQN, Martin Ratio, GPR, Win Rate, Total Profit, Average Profit, Profit Factor, Sortino + Calmar Composite, and Robust Score.
Note: Auto-Tune is systematic parameter optimization on historical data — not predictive AI. Past performance does not guarantee future results.
🎯 Multi-Mode Entry System
Switch between trend-following, contrarian, and sniper modes — all within one strategy. No need to maintain multiple scripts.
🛡️ Adaptive Risk Management
Trailing SL modes that respond to your TP hits:
- Breakeven: Locks in safety after your chosen TP is reached
- Moving Target: Ratchets your stop to the previous TP level as profit grows
📊 Reproducible Results
Full transparency on strategy properties so you can replicate exact backtest conditions.
█ ENTRY ENGINES
Normal + Smart (Default)
- Normal: Contrarian entries — momentum cross against the trend filter for reversal plays
- Smart: Trend-following entries — momentum cross with the trend filter for continuation plays
Auto-Tune Mode
- Tests 500+ parameter combinations against historical data
- Simulates trades internally using your TP/SL configuration
- Scores by your chosen metric (Sharpe, Sortino, Calmar, Win Rate, etc.)
- Walk-Forward: Re-optimizes every N bars to adapt to regime changes
- Static: Locks in best-scoring settings from full available history
HL Sniper
- Trend-trigger mode for more selective entries
- Fewer signals, but more selective setups
Auto-Tune Sniper
- Optimizes RSI period, smoothing factor, and trigger sensitivity
- Adapts sniper configuration based on historical performance
█ EXIT MODES
1) Percentage Targets
- Up to 6 TP levels (TP1…TP6) with customizable partial exits
- Configure both price distance (%) and position size (%) for each level
- Designed for scaling out rather than all-in/all-out
2) Signal Step-Outs
- Momentum-shift condition triggers partial exits
- Optional higher-timeframe confirmation
- "New TP Must Beat Last" prevents weak consecutive exits
3) Opposite Signal
- Closes/flips position when the next opposite entry signal appears
- Best for trend-following systems
█ USE CASES
📈 Trending Markets
Use "Smart" signals + Percentage TPs. Stay aligned with momentum while scaling out at multiple targets. Enable Moving Target trailing to lock in profits.
📉 Ranging / Choppy Markets
Use "Normal" signals (contrarian mode). Catch reversals at range boundaries. Tighter TP targets work better here.
⚡ High Volatility / News Events
Use "HL Sniper" for selective entries. Fewer signals, more selective. Wider SL to accommodate volatility.
🤖 Automation & Bots
Structured alert payloads work with popular bot platforms and custom webhooks. Entry + 6 TPs + SL in one alert.
█ HOW TO USE
- Apply to your chart (any timeframe, any market)
- Start with Entry Signals = "Normal + Smart", Exit Mode = "Percentage"
- Pick your direction (Long / Short / Both)
- Adjust signal thresholds and trend filter length to match your style
- Configure TP% levels and Qty% — total should sum to 100%
- Enable Stop-Loss and choose a trailing mode
- Set commission and slippage in Strategy Properties for realistic results
- Optional: Enable Auto-Tune for adaptive optimization
█ STRATEGY PROPERTIES
Default settings for reproducible backtests:
- Initial capital: 10,000 USD
- Order size type: Cash
- Default order size: 10,000
- Process orders on close: Enabled
- Pyramiding: Controlled by "Allow Add-On Entries"
For realistic results, set commission and slippage in Strategy Properties to match your broker/exchange.
█ ALERTS & AUTOMATION
The strategy outputs structured alert payloads compatible with:
- Popular bot platforms and webhook receivers
- Custom automation systems (JSON format)
Setup: Create alert → Select "Order fills and alert() function calls" → Use {{strategy.order.alert_message}} placeholder
█ WORKS ON
- Crypto
- Forex
- Stocks
- Indices
- Commodities
█ REALISTIC EXPECTATIONS
- No strategy wins 100% of the time — this is no exception
- Auto-Tune optimizes on past data — it cannot predict the future
- Backtest results ≠ live results (fees, slippage, and emotions matter)
- Always validate with out-of-sample data before going live
- Use proper position sizing and risk management
█ LIMITATIONS
- Backtests are simulations — results depend on market conditions, fees, slippage, and parameters
- Auto-Tune can overfit if used without out-of-sample validation
- Multi-timeframe exit logic confirms on higher-TF bar closes (slight delay expected)
- Use standard candles/bars for strategy testing (avoid Heikin Ashi, Renko)
█ DISCLAIMER
This strategy is provided for educational and informational purposes only and does not constitute financial advice. Past performance is not indicative of future results. Trading involves substantial risk of loss, and you are solely responsible for your own trading decisions.
Скрипт с ограниченным доступом
Доступ к этому скрипту имеют только пользователи, одобренные автором. Вам необходимо запросить и получить разрешение на его использование. Обычно оно предоставляется после оплаты. Для получения подробной информации следуйте инструкциям автора ниже или свяжитесь напрямую с InfinityAlgo.
TradingView НЕ рекомендует оплачивать или использовать скрипт, если вы полностью не доверяете его автору и не понимаете, как он работает. Вы также можете найти бесплатные, открытые альтернативы в наших скриптах сообщества.
Инструкции от автора
Отказ от ответственности
Скрипт с ограниченным доступом
Доступ к этому скрипту имеют только пользователи, одобренные автором. Вам необходимо запросить и получить разрешение на его использование. Обычно оно предоставляется после оплаты. Для получения подробной информации следуйте инструкциям автора ниже или свяжитесь напрямую с InfinityAlgo.
TradingView НЕ рекомендует оплачивать или использовать скрипт, если вы полностью не доверяете его автору и не понимаете, как он работает. Вы также можете найти бесплатные, открытые альтернативы в наших скриптах сообщества.