🔄 Automating Infinity Algo Alerts via Alertatron
Guide for non-backtest version
CRITICAL: Alertatron has TWO different systems. DO NOT MIX THEM:
Signals Lite - JSON messages only, no scripts
Script Bots - Full scripting with
MyKeys{...} #bot
Signals Lite does NOT use MyKeys{...} or #bot tags!
Choose ONE system and follow ONLY that guide below.
🎯 Which System Should You Use?
Choose Signals Lite if you want:
✅ Quick 5-minute setup
✅ Visual configuration (no coding)
✅ Simple long/short automation
✅ Lower chance of errors
✅ Easy to modify settings
Perfect for:
New to automation
Basic buy/sell/close needs
Want it working fast
Choose Script Bots if you need:
✅ Complex order logic
✅ Multi-step TP ladders
✅ Conditional execution
✅ Position pyramiding
✅ Custom OCO groups
✅ Timing delays
Required skills:
Comfortable with code
Can debug scripts
Need advanced features
📘 Option 1: Signals Lite (Recommended)
Simple JSON signal-based automation with visual configuration.
⚙️ Step 1: Create Signals Lite Bot
Navigate to Signals Lite → Your Bots
Click "Create new automated bot..."
Configure your bot:
Bot name
e.g. Infinity Algo BTC
Exchange
Select your exchange
Symbol
e.g. BTCUSDT or BTC
Access
Set to Private
Click Create Bot
🔑 Step 2: Configure Bot Settings
After creating your bot:
Click on your bot name to expand
Find "API Keys" section
Add your exchange API credentials
Save configuration
Never enable withdrawal permissions for trading bots
Configure default behavior that can be overridden per alert:
Position Size: % of balance or fixed amount
Leverage: Your preferred leverage
Order Type: Market or Limit
Take Profit: Enable and set offset %
Stop Loss: Set risk %
Hedge Mode: If supported by exchange
📩 Step 3: Get Your Webhook
Copy the exact webhook shown on your bot page. Don't guess the path—formats can change.
Your bot page will display a unique webhook URL. Copy it exactly as shown - you'll need it for TradingView.
📊 Step 4: Create TradingView Alerts
Available Infinity Algo Alerts
Buy Signals:
1.0 Buy Signal - Normal1.1 Buy Signal - Smart1.2 Normal or Smart Buy1.3 Buy Signal - HL Sniper1.4 Buy Signal - AI
Sell Signals:
1.5 Sell Signal - Normal1.6 Sell Signal - Smart1.7 Normal or Smart Sell1.8 Sell Signal - HL Sniper1.9 Sell Signal - AI
Management:
2.0 Take Profit Long2.1 Take Profit Short2.2 Stop Loss Long Hit2.3 Stop Loss Short Hit2.4 Possible Long Coming(info only)2.5 Possible Short Coming(info only)
Alert Configuration
Open your Infinity Algo chart
Create alert (Alt+A)
Configure:
Condition
e.g. "1.1 Buy Signal - Smart"
Options
Once Per Bar Close (prevents duplicates!)
Alert name
e.g. "IA Smart Buy"
Message
JSON template (see below)
Webhook URL
Your bot's webhook from Step 3
📝 Signals Lite Message Templates
Messages MUST be valid JSON. Start simple (side + amount) and optionally override defaults such as TP/SL, hedge mode, or closing the opposite side.
Minimal Long Entry:
{"side":"long","amount":"25%"}Minimal Short Entry:
{"side":"short","amount":"25%"}Close Position:
{"side":"close"}Long with TP/SL override:
{
"side": "long",
"amount": "50%",
"takeProfit": true,
"takeProfitOffset": "2%",
"stopLoss": true,
"stopLossOffset": "1%",
"closeExisting": true
}Short with leverage:
{
"side": "short",
"amount": "100%",
"leverage": 10,
"takeProfit": true,
"takeProfitOffset": "1.5%"
}Using TradingView placeholders:
{
"side": "long",
"amount": "25%",
"entry": "limit",
"price": "{{close}}"
}Available Override Fields
See full documentation: Override signal settings
side
string
"long", "short", or "close"
amount
string
Position size (e.g., "50%", "100")
takeProfit
boolean
Enable take profit
takeProfitOffset
string
TP distance (e.g., "2%")
stopLoss
boolean
Enable stop loss
stopLossOffset
string
SL distance (e.g., "1%")
closeExisting
boolean
Close opposite position first
useHedgeMode
boolean
Use hedge mode if available
leverage
number
Override leverage
entry
string
"market" or "limit"
price
string
Limit price (if entry="limit")
That's it! Your Signals Lite bot is ready. Test with small amounts first.
📗 Option 2: Script Bots (Advanced)
Full scripting control with complex order logic and multi-step TP ladders.
Prerequisites: Understand basic scripting and can debug syntax errors. If not, use Signals Lite above.
⚙️ Step 1: Configure Script Bot Infrastructure
A. Add API Keys First
Go to Scripting Signals → Script Bot Config → Script Bot API Keys
Click "Add API Keys"
Configure:
Name: e.g.
MyKeys(remember this exactly!)Exchange: Your exchange
API Key & Secret: Your credentials
Save your keys
B. Get Your Account Webhook
Go to Account → Webhook Details
Copy the exact webhook shown (don't guess the format)
C. Configure Bot Group
Go to Scripting Signals → Trading Bot Settings
Set up a group that filters for
#botRoute this group to the trading engine
📊 Step 2: Available Alert Conditions
Same as Signals Lite - all 16 alerts available:
📋 Step 3: Create TradingView Alerts
Configuration is similar but the message contains scripts:
Condition
Your chosen signal
Options
Once Per Bar Close (prevents duplicates!)
Message
Your script (see templates)
Webhook URL
Your account webhook (NOT Signals Lite!)
📝 Script Bot Templates
Every script MUST end with #bot or it won't execute!
MyKeys({{ticker}}) {
# Enter long with 100% of available balance
market(side=buy, amount=100%a);
# Stop loss 1% below entry
stopOrder(side=sell, amount=100%p, stop=e-1%, reduceOnly=true);
# Multi-step TP ladder with OCO
oneCancelsOther(which=all);
limit(position=75%p, offset=e1%, reduceOnly=true);
limit(position=50%p, offset=e2%, reduceOnly=true);
limit(position=25%p, offset=e3%, reduceOnly=true);
limit(position=0, offset=e4%, reduceOnly=true);
oneCancelsOther();
}
#botThis multi-step TP ladder is ONLY possible with Script Bots!
MyKeys({{ticker}}) {
# Enter short
market(side=sell, amount=100%a);
# Stop loss 1% above entry
stopOrder(side=buy, amount=100%p, stop=e+1%, reduceOnly=true);
# Multi-step TP ladder (negative values for short)
oneCancelsOther(which=all);
limit(position=-75%p, offset=e-1%, reduceOnly=true);
limit(position=-50%p, offset=e-2%, reduceOnly=true);
limit(position=-25%p, offset=e-3%, reduceOnly=true);
limit(position=0, offset=e-4%, reduceOnly=true);
oneCancelsOther();
}
#botMyKeys({{ticker}}) {
# Close any position
limit(position=0, offset=1, reduceOnly=true);
# Cancel all orders
cancel(which=all);
}
#botMyKeys({{ticker}}) {
# Cancel existing orders
cancel(which=all);
# Flip to long (closes short if exists)
market(position=100%a);
# Single SL and TP
stopOrder(side=sell, amount=100%p, stop=e-2%, reduceOnly=true);
limit(side=sell, amount=100%p, offset=e3%, reduceOnly=true);
}
#botMyKeys({{ticker}}) {
# Only add if position < 10000
continue(if=positionLessThan, value=10000);
# Add to position
market(side=buy, amount=1000);
# Trailing stop
trailingStop(side=sell, amount=100%p, offset=e-1.5%,
trailingMethod=stepped, stepSize=0.5%, maxSteps=3);
}
#botMyKeys({{ticker}}) {
# Wait 5 minutes
wait(5m);
# Then enter
market(side=buy, amount=50%a);
# Add protection
stopOrder(side=sell, amount=100%p, stop=e-1%, reduceOnly=true);
}
#bot🔤 Script Command Reference
🛠️ Troubleshooting
Bot not responding
Check webhook URL is exactly copied
Invalid message
Must be valid JSON format
Wrong size
Verify % vs fixed amount in JSON
No TP/SL
Set in bot or override with JSON fields
Duplicate orders
Ensure "Once Per Bar Close" in TradingView
Script ignored
Missing #bot tag at end
Invalid keys
Check key alias spelling (case-sensitive)
Parse error
Check Alertatron inbox for error details
Orders size 0
Missing % on sizing (%a or %p)
TP/SL not canceling
Need oneCancelsOther() wrapper
📚 Resources
Remember:
Alertatron is a third-party service with separate costs
Always test with small amounts first
Use exchange testnet when available
Manual trading via TradingView is always an option
Last updated
Was this helpful?

