Backtest
Alerts - Backtest Version
The Backtest Version of Infinity Algo V3.0 includes automatic alert generation with structured messages perfect for trading automation. Unlike the standard version, alerts are triggered programmatically without manual setup.
Key Differences from Standard Version
Standard Version
- Manual setup for each signal type
- User-defined message format
- Basic take profit / stop loss alerts only
- Requires text formatting
- Multiple alerts needed
Backtest Version
- Automatic via code
- Pre-formatted structure
- All take profit / stop loss levels included
- Ready for automation
- Single unified alert
How to Enable Automatic Alerts
Add Backtest Indicator
Load the Backtest Version to your chart from Invite-only Scripts
Configure Alert Settings
Navigate to indicator settings and enable:
Enable Alerts?Create Master Alert
- Right-click chart → Add Alert
- Set condition: Infinity Algo Backtest → Any alert() function call
- Configure notifications (webhook, email, mobile)
Alert Message Format
The Backtest Version generates structured messages perfect for automation, with optional percentage display for exit levels.
Exchange=BINANCE
Symbol=BTCUSDT
Side=Long
Leverage=10x
Entry=45250.50
TP1=45700.00
TP2=46150.00
TP3=46600.00
TP4=47050.00
TP5=47500.00
TP6=47950.00
SL=43250.00
SignalType=AI Sniper BuyExchange=BINANCE
Symbol=BTCUSDT
Side=Long
Leverage=10x
Entry=45250.50
TP1=45700.00 (30%)
TP2=46150.00 (25%)
TP3=46600.00 (20%)
TP4=47050.00 (15%)
TP5=47500.00 (7%)
TP6=47950.00 (3%)
SL=43250.00 (100%)
SignalType=AI Sniper BuyCore Fields (Always Present)
Exchange→ Trading venue (auto-detected)Symbol→ Trading pair/tickerSide→ Long or Short positionLeverage→ Position leverageEntry→ Entry price at signal
Conditional Fields
TP1-TP6→ Only if enabled in settingsSL→ Only if stop loss enabledSignalType→ For HL/AI Sniper modes
Optional Percentages
- Exit percentages → When
Show Exit % in Alerts?enabled - Format:
Price (XX%) - SL always shows
(100%)
Multiple Take Profit Strategy
When multiple take profits are enabled, the alert includes all active levels for sophisticated exit strategies:
- Partial exits at each take profit level based on your configured percentages
- Scale out of positions gradually to lock in profits
- Risk reduction as price moves favorably
- Optional percentages displayed directly in alerts for automation
Understanding Exit Percentages
The Show Exit % in Alerts? setting adds position exit percentages to each level, making it easier for bots to parse exit sizes:
Without Percentages (Default):
- Clean price levels only
- Bot needs separate configuration for exit sizes
- Simpler format for manual traders
With Percentages Enabled:
- Each level shows
Price (XX%) - Bot can parse exit sizes directly from alert
- No additional configuration needed
Advanced Configuration
Customization Options
Custom Symbol Override
Use the Alert Ticker setting to:
- Send alerts for a different symbol
- Normalize naming conventions for your broker
- Handle exchange-specific formatting
Example: Set XBTUSD instead of BTCUSDT for BitMEX compatibility
Leverage Customization
The Alert Leverage setting allows:
- Different leverage from display settings
- Exchange-specific limits (e.g., max 20x)
- Risk management overrides
- Position sizing calculations
Real-World Setup Examples
Example 1: Simple Long Entry
Configuration:
- Exit Type:
Percentage - Only TP1:
2%enabled - Stop Loss:
3%enabled - Leverage:
5x - Show Exit %:
Disabled
Exchange=BINANCE
Symbol=ETHUSDT
Side=Long
Leverage=5x
Entry=2250.75
TP1=2295.77
SL=2183.23Example 2: Complex Multi-TP Strategy
Configuration:
- All 6 take profits enabled
- Stop loss enabled
- Signal Mode:
AI Sniper - Leverage:
10x - Show Exit %:
Enabled
Exchange=BINANCE
Symbol=BTCUSDT
Side=Short
Leverage=10x
Entry=45000.00
TP1=44550.00 (30%)
TP2=44100.00 (25%)
TP3=43650.00 (20%)
TP4=43200.00 (15%)
TP5=42750.00 (7%)
TP6=42300.00 (3%)
SL=46350.00 (100%)
SignalType=AI Sniper SellCritical Considerations
Troubleshooting Guide
| Issue | Possible Causes | Solution |
|---|---|---|
| No alerts firing | Settings misconfigured | • Enable Enable Alerts in settings• Verify alert condition is Any alert() function call• Ensure using Backtest Version (not standard) |
| Wrong symbol | Override active | • Clear Alert Ticker field to use current chart• Check exchange formatting requirements |
| Missing TP/SL levels | Not configured | • Enable desired levels in Exit Settings • Set Exit Type to Percentage• Configure take profit percentages |
| Webhook not receiving | Connection issue | • Test webhook URL with webhook.site • Check message format compatibility • Verify JSON formatting if needed |
| Duplicate alerts | Multiple alerts created | • Delete all alerts • Create only ONE master alert • Check alert history |
Integration Methods
Choose your integration path based on your technical skills and needs:
Fastest Setup — Zero Programming Required
Option 1: TradingView → Telegram/Discord via Webhook Bridge
Create Webhook Bridge
- Go to tradingview.to
- Create free account
- Generate webhook URL
- Select destination (Telegram/Discord)
Configure TradingView Alert
- Create alert with
Any alert() function call - Paste webhook URL from tradingview.to
- Done! Messages auto-forward to your channel
- Create alert with
Option 2: Direct Discord Webhook
1. Open Discord Server Settings
2. Integrations → Webhooks → New Webhook
3. Copy webhook URL
4. Paste in TradingView alertVisual Automation Tools
Using Pipedream/Make (formerly Integromat)
Why use this?
- Reformat messages
- Add conditional logic
- Send to multiple destinations
- Add retry logic
- No server needed
1. HTTP Webhook trigger (receives from TradingView)
2. Parse the message
3. Format for destination
4. Send to:
- Telegram Bot
- Discord Webhook
- Google Sheets
- Email
- DatabaseSample Pipedream Workflow
export default defineComponent({
async run({ steps, $ }) {
// Parse incoming alert
const lines = steps.trigger.event.body.split('\n');
const data = {};
lines.forEach(line => {
const [key, value] = line.split('=');
data[key] = value;
});
// Format for Discord
return {
content: `${data.Symbol} Signal`,
embeds: [{
title: `${data.Side} Position`,
fields: [
{ name: "Entry", value: data.Entry, inline: true },
{ name: "TP1", value: data.TP1, inline: true },
{ name: "SL", value: data.SL, inline: true }
],
color: data.Side === "Long" ? 0x00ff00 : 0xff0000
}]
};
}
});Custom Server Implementation
For maximum control, run your own webhook endpoint:
from fastapi import FastAPI, Request
import hmac
import hashlib
app = FastAPI()
@app.post("/webhook")
async def handle_alert(request: Request):
# Verify TradingView signature (optional)
body = await request.body()
# Parse alert
data = parse_alert(body.decode())
# Custom logic
if data['Symbol'] in WATCHLIST:
# Execute trade
execute_trade(data)
# Log to database
log_trade(data)
# Notify multiple channels
notify_telegram(data)
notify_discord(data)
return {"status": "processed"}Advanced Features:
- Request verification
- Database logging
- Multi-exchange execution
- Custom risk management
- Retry logic & error handling
Popular Bot Integrations
Cornix Bot (Automated Trading)
Easiest automated execution:
- Get Cornix webhook URL from bot settings
- Paste in TradingView alert webhook field
- Cornix auto-parses and executes trades
Supports:
- Multiple exchanges (Binance, Bybit, etc.)
- Position management
- Risk settings
- DCA strategies
Other Trading Bots
| Bot Service | Setup Difficulty | Features | Best For |
|---|---|---|---|
| Cornix | Easiest | Full automation | Beginners |
| 3Commas | Easy | DCA, Grid bots | Intermediate |
| TradersPost | Easy | Multi-broker | Stock traders |
| PineConnector | Medium | MT4/MT5 bridge | Forex |
| Custom Bot | Hard | Unlimited | Developers |
Important Limits & Gotchas
Quick Start Recommendations
I just want signals in Telegram/Discord
Use tradingview.to (Track A) — 2 minute setup, no coding needed
I want to auto-trade on Binance/Bybit
Use Cornix Bot — Paste webhook URL, configure risk settings, done
I need custom formatting or multiple destinations
Use Pipedream or Make (Track B) — Visual workflow builders
I’m a developer and need full control
Build a custom endpoint (Track C) — See Pro tab for examples
Summary
Perfect for automated trading systems, backtesting validation, and hands-free alert management.
