SSL Hybrid Automation Tutorial
Step-by-step guide to automating the SSL Hybrid indicator with TradersPost, including alert setup and code modifications for streamlined automation.
Marketing
Reviewed by Mike Christensen
Fact-checked by Mike Christensen
The SSL Hybrid indicator provides clear buy and sell signals that work well for automated trading. This guide walks you through two approaches to automation: the quick method using standard alerts, and the advanced method using code modifications for greater efficiency.
Understanding SSL Hybrid Signals
The SSL Hybrid indicator by Mihkel00 combines multiple timeframes and moving averages to generate baseline buy and sell signals. These signals appear as clear entry and exit points on your chart, making them ideal for automation.
When you add SSL Hybrid to your TradingView chart, you'll see baseline buy entries, sell exits, and corresponding signals for the opposite direction. These pre-built alerts provide the foundation for your automated strategy.
Quick Automation Method
Setting Up Your TradersPost Strategy
Before creating alerts, set up a strategy in TradersPost. Navigate to your dashboard and create a new strategy for the SSL Hybrid system. Subscribe to this strategy by connecting it to your target broker.
Configure the subscription to allow both bullish and bearish signals if you want to trade in both directions. Enable your subscription to activate automated order execution.
Creating Basic Alerts
Right-click on your TradingView chart and select Create Alert. For your buy signals, choose the SSL Hybrid indicator and select "Baseline Buy Entry" as your condition. Set the alert to trigger once per bar and extend the expiration indefinitely.
In the notifications section, paste your TradersPost webhook URL. In the message field, add the JSON payload for buy orders:
` { "ticker": "{{ticker}}", "action": "buy", "price": "{{close}}" } `
Create a separate alert for sell signals using the "Baseline Sell Exit" condition with the opposite action.
Adding Exit Alerts
SSL Hybrid includes dedicated exit signals. Create additional alerts for "Exit Buy" and "Exit Sell" signals. For these exit alerts, use the sentiment parameter set to "flat" to ensure positions close without opening opposing positions:
` { "ticker": "{{ticker}}", "action": "exit", "sentiment": "flat" } `
This four-alert system provides complete automation coverage for the SSL Hybrid strategy.
Understanding Side Swapping
By default, TradersPost uses side swapping, meaning a sell signal automatically closes any open buy position and opens a short position. If you only want to close positions without reversing direction, use the exit action with sentiment flat.
Configure this in your TradersPost subscription settings under the side swapping option. Enable it for automatic position reversal, or disable it to require explicit exit signals.
Advanced Method: Code Modifications
Why Modify the Code
Creating four separate alerts for every chart and ticker becomes tedious when scaling your automation. By modifying the indicator code, you can consolidate all signals into a single alert, dramatically simplifying deployment.
Creating a Working Copy
Access the SSL Hybrid source code by clicking the curly braces icon in the indicator settings. Create a working copy to make modifications. If the code is in PineScript version 4, convert it to version 5 for access to newer features.
Adding Alert Messages
The basic modification adds input fields for alert messages. Add these lines to create text area inputs:
`pinescript alertMessageBuy = input.text_area("", title="Buy Message", group="Alerts") alertMessageSell = input.text_area("", title="Sell Message", group="Alerts") alertMessageExitBuy = input.text_area("", title="Exit Buy Message", group="Alerts") alertMessageExitSell = input.text_area("", title="Exit Sell Message", group="Alerts") `
Implementing Alert Function
Locate the existing alert conditions in the code. For baseline buy signals, add:
`pinescript if (baselineBuyCondition) alert(alertMessageBuy) `
Repeat this for sell, exit buy, and exit sell conditions using their respective message variables.
Using Text Areas
Using input.text_area instead of input.string provides larger input fields in the settings, making it easier to paste and edit JSON payloads without scrolling through tiny fields.
Consolidated Alert Setup
Single Alert Configuration
After modifying the code, create just one alert for the indicator. Choose "Any alert function call" as the condition. This option appears when you've added the alert function to your code.
This single alert triggers whenever any of the four conditions occur, using the appropriate message for each situation. Instead of managing four alerts per chart, you now manage one.
Message Configuration in Settings
With your modified indicator, all alert messages configure through the indicator settings. Paste your JSON payloads directly into the text areas. You can easily modify messages for different instruments or strategies without recreating alerts.
Position Sizing Configuration
Using Signal Quantity
If your alert messages include quantity information from your strategy, TradersPost can use those values directly. Enable "Use Signal Quantity" in your subscription settings to respect the position sizes specified in your alerts.
Fixed Quantity Mode
Alternatively, configure fixed position sizes in your TradersPost subscription. This approach provides centralized control over position sizing without modifying alert messages for different account sizes.
Risk Management Integration
Stop Loss Placement
While SSL Hybrid generates entry and exit signals, consider adding stop loss protection for unexpected market moves. Configure stop losses in your TradersPost subscription settings as either fixed percentages or dollar amounts.
Take Profit Targets
Similarly, add take profit targets to lock in gains even if the indicator hasn't generated an exit signal yet. This combines the indicator's trend-following nature with practical profit protection.
Testing Your Automation
Paper Trading Verification
Before deploying real capital, test your setup with paper trading. Verify that:
- Alerts trigger at correct signal points
- Messages contain proper ticker and action information
- Orders execute at expected times
- Position sizing calculates correctly
- Side swapping behaves as intended
Monitoring Live Performance
Once live, monitor your TradersPost dashboard for trade execution. Review the signal log to confirm messages arrive as expected and orders execute without rejection.
Scaling Across Multiple Charts
Efficiency Gains from Code Modification
The advanced method's benefits become clear when trading multiple instruments. Instead of creating and managing sixteen alerts for four instruments, you create just four alerts total.
Consistent Configuration
Code modifications ensure consistent alert message formatting across all your charts. Update the JSON structure once in the indicator settings, and all alerts use the updated format.
Common Issues and Solutions
Missing Alert Triggers
If alerts don't fire when expected, verify the indicator conditions match your chart timeframe. Alerts set to trigger once per bar only fire at bar close, which may differ from real-time visual signals.
Incorrect Position Sizes
Position sizing discrepancies often result from mismatched settings between signal quantity and subscription configuration. Decide whether position sizes come from alert messages or subscription settings, then configure consistently.
Side Swapping Confusion
Unexpected position reversals typically indicate side swapping is enabled when you expected explicit exits. Review your subscription settings and alert message sentiment parameters to align behavior with your intentions.
Key Takeaways
SSL Hybrid automation can start with simple alert creation and progress to sophisticated code modifications for efficient scaling. The quick method gets you trading immediately with four alerts per instrument. The advanced method provides streamlined management and consistent configuration across your trading universe.
Choose your approach based on scale: quick method for testing or single-instrument trading, advanced method for portfolio-wide deployment. Both approaches integrate seamlessly with TradersPost, enabling reliable automated execution of SSL Hybrid signals.