🔄 Automating Infinity Algo Alerts via WunderTrading
Guide for non-backtest version
Connect Infinity Algo signals to WunderTrading for automated trading with flexible position management.
🎯 Two Trading Workflows
Auto-Flip Positions (Futures Only)
What it does:
Automatic Long ↔ Short flipping
Just two alerts needed
Bot handles position reversal
With Swing Trade ON, Enter-Long/Enter-Short flip positions automatically
Best for:
✅ Futures trading only
✅ Trending markets
✅ Minimal alerts
✅ Always in position
Swing Trade: ON (Futures only!)
Alerts: 2 total
- Buy Signal → Enter-Long
- Sell Signal → Enter-Short
(Exit-All only for flattening without opening opposite)
Important: Swing trade functionality is only available for Futures markets.
⚙️ Step 1: Build Signal Bot in WunderTrading
Navigate to WunderTrading:
Log in → Bots → Signal Bot → Create bot
Configure General tab settings:
Name
e.g. Infinity Algo BTC
Exchange/API
Select your exchange API
Pairs
Select up to 10 pairs in UI
Timeframe label
Any (just a label)
Multiple entries
ON for scale-ins
Swing trade
ON for auto-flip (Futures)
Note: Pairs must be selected in the bot UI. JSON cannot override pair selection.
📩 Step 2: Configure Entries & Get Webhook
Entries tab configuration:
Bot start condition
TradingView Alert
Bot settings format
JSON
After saving, your bot will display:
Webhook URL: Copy the exact URL shown in your bot's Alerts tab
Alert comments: Copy exactly as shown (default:
Enter-Long
,Enter-Short
,Exit-All
)
Critical:
Copy the exact webhook URL from your bot - don't guess the format
Comment codes are case-sensitive and may change if you edit bot Name/Exchange/Timeframe/Pair
After any bot edits, update your TradingView alerts to match
📊 Step 3: Create TradingView Alerts
Standard Alert Settings
Condition
Select your Infinity Algo signal (e.g., "Buy Signal - Smart")
Options
Once Per Bar Close (prevents duplicate orders)
Webhook URL
Paste the exact URL from your bot's Alerts tab
Message
JSON template (see below)
📝 JSON Templates
{
"code": "Enter-Long", // must match your bot's comment EXACTLY
"orderType": "market",
"amountPerTradeType": "quote", // quote currency (e.g., USDT on BTC/USDT)
"amountPerTrade": 150,
"takeProfits": [
{ "priceDeviation": 0.01, "portfolio": 0.25 },
{ "priceDeviation": 0.02, "portfolio": 0.25 },
{ "priceDeviation": 0.03, "portfolio": 0.25 },
{ "priceDeviation": 0.04, "portfolio": 0.15 },
{ "priceDeviation": 0.05, "portfolio": 0.07 },
{ "priceDeviation": 0.06, "portfolio": 0.03 }
],
"stopLoss": { "priceDeviation": 0.01 },
"reduceOnly": true, // prevents exits from increasing size (Futures only)
"placeConditionalOrdersOnExchange": false
}
Note: TP portfolios must sum to exactly 1.0 (100%)
⚡ Quick Comparison
Market Type
⚠️ Futures only
✅ Spot & Futures
Alerts Needed
2 (minimal)
3+ (entry/exit/re-entry)
Position Control
Automatic flip
Manual control
Position Gaps
Never
Possible
Complexity
Simple
Moderate
🎯 Pick Your Workflow
A) Ping-pong (auto flip) Long → Short → Long with just two alerts
Turn Swing trade = ON in bot (Futures only)
• Buy alert → Enter-Long
JSON
• Sell alert → Enter-Short
JSON
• Use Exit-All
only when you want to flatten without opening opposite
B) Explicit exit first Never overlap positions; more control
Leave Swing trade = OFF
• Entry alert → Enter-Long
or Enter-Short
JSON
• Exit alert → Exit-Long
or Exit-Short
JSON
• (Optional) second entry alert to reverse
🚀 Advanced Features
0-6 Take Profit Levels
Add up to 6 TP steps
Portfolios must sum to 1.0
Multi-pair requires
priceDeviation
(decimals, not %)Single-pair can use
price
"takeProfits": [
{ "priceDeviation": 0.01, "portfolio": 0.30 },
{ "priceDeviation": 0.02, "portfolio": 0.25 },
{ "priceDeviation": 0.03, "portfolio": 0.20 },
{ "priceDeviation": 0.04, "portfolio": 0.15 },
{ "priceDeviation": 0.05, "portfolio": 0.07 },
{ "priceDeviation": 0.06, "portfolio": 0.03 }
]
Sum = 1.0 (100%) ✅
🧠 Pro Tips
priceDeviation format – Use decimals (0.02) not percentages (2%)
Portfolio sum – TP portfolios must add up to exactly 1.0 (100%)
reduceOnly – Applies to exits; has no effect on Spot markets
Comment codes – Copy exactly from your bot; they change if you edit bot settings
Strategy alerts – Use
alert()
function with{{strategy.order.comment}}
for strategiesPaper test first – WunderTrading log shows "Signal executed" if webhook parsed correctly
🛠️ Troubleshooting Checklist
No deal appears
code
in JSON doesn't match bot's Alert comment exactly (check case!)
Bot opens but doesn't close
Swing trade OFF and you forgot exit alert – or reduceOnly:false
caused flip
Webhook error 400
JSON syntax error or using %
instead of decimals (use 0.02
, not 2%
)
Duplicate deals
Alert set to "Once Per Bar" instead of "Once Per Bar Close"
Multi-pair TP/SL fails
Must use priceDeviation
(decimals), not price
Comments changed
Bot edits can change comment codes - update alerts after any bot changes
🔤 JSON Key Reference
code
Alert comment identifier
Must match bot's comment exactly (case-sensitive!)
orderType
Order execution type
market
or limit
amountPerTradeType
Position size unit
Spot: quote
/base
/percents
Futures: quote
/contracts
/percents
amountPerTrade
Position size
Value depends on type above
takeProfits
Array of partial exits
priceDeviation
: decimal (0.02 = 2%)
portfolio
: fraction to close (must sum to 1.0)
stopLoss
Stop loss configuration
priceDeviation
: decimal from entry
reduceOnly
Prevent size increase
true
→ exits only decrease position (Futures only, no effect on Spot)
placeConditionalOrdersOnExchange
Where orders execute
false
= managed by bot
true
= on exchange
🎯 Which Workflow Should You Use?
Choose Swing Trade if:
Trading Futures only
Want minimal alerts
Trust your signals
Always in position
Choose Explicit Exit if:
Trading Spot markets
Need position control
Want gap periods
Risk management focus
Pro Tip: Start with Explicit Exit to learn, then switch to Swing Trade for Futures efficiency
📚 Resources
Important Reminders:
WunderTrading is a third-party service with separate subscription costs
Always test with small amounts or paper trading first
Comment codes are case-sensitive and can change when you edit bot settings
Manual trading via TradingView is always available as an alternative
Last updated
Was this helpful?