https://www.tradingview.com/script/oc2K8Hkq-TradingView-Alert-Adapter-for-AlgoWay
TRALADAL is an open-source TradingView strategy that acts as a universal adapter between indicator signals and automated execution through AlgoWay.
The adapter focuses on three operational goals:
TRALADAL does not generate trading ideas and does not provide “signals” by itself. It evaluates inputs you connect (sources/values) and translates them into consistent strategy actions.
TRALADAL is built around an input source–based model.
Instead of hardcoding indicators, it reads values from user-selected input.source fields.
This allows the adapter to work with:
Internally, the strategy uses a three-layer logic model:
Each layer can be enabled independently, and layers can be combined using AND / OR logic, allowing multi-indicator systems without writing Pine code.
TRALADAL supports two execution philosophies:
TRALADAL reduces your connected indicator outputs into booleans:
long_signal and short_signallong_confirm and short_confirmfilter_ok (or separate long/short filters)The adapter then computes final permissions:
final_long_ok = long_signal AND/OR long_confirm AND filter_ok
final_short_ok = short_signal AND/OR short_confirm AND filter_ok
This section describes recommended patterns you can apply depending on what your indicator outputs represent.
final_long_ok = SignalLong AND ConfirmLong AND FilterOK
final_short_ok = SignalShort AND ConfirmShort AND FilterOK
final_long_ok = (SignalLong OR ConfirmLong) AND FilterOK
final_short_ok = (SignalShort OR ConfirmShort) AND FilterOK
Minimal setup for quick testing:
final_long_ok = SignalLong
final_short_ok = SignalShort
Minimal setup is useful for: verifying that you wired the correct sources, confirming that long/short polarity is correct, and validating alert firing frequency.
TRALADAL can represent entries in two practical forms:
If your input sources represent states, you must ensure that the adapter triggers only when the state changes, otherwise you can get repeated alerts on every bar.
Recommended practice:
TRALADAL separates two concepts:
A “Flat” task can be triggered by one of these families:
In automated execution you must choose one clear policy:
task = sell (and AlgoWay handles the reversal according to webhook mode).Recommended for multi-indicator systems: Policy 2, because it avoids whipsaw flips when two indicators disagree on consecutive bars.
TRALADAL supports risk fields typically used in AlgoWay automation:
Minimal values depend on:
Recommended:
Recommended:
If you combine many indicators, avoid “OR everywhere”. This creates frequent entries with low quality.
Recommended:
In the TradingView alert dialog, TRALADAL is designed to be used with:
The payload must be:
The exact field names must match the TRALADAL code. This is a reference example used in AlgoWay-style routing:
{
"uuid": "YOUR_WEBHOOK_UUID",
"platform": "metatrader5",
"symbol": "{{ticker}}",
"task": "buy",
"risk": 1.0,
"sl_pips": 25,
"tp_pips": 50,
"trail_pips": 0,
"comment": "TRALADAL"
}
IMPORTANT: The “Inputs (Menu)” section below is where each input is mapped to: a) internal strategy variables, b) payload fields, c) recommended ranges. To make it 100% exact, paste the full Pine source code from “Source code”.
This section is intentionally structured as a full “menu-by-menu” reference. Each row explains:
| Input (Menu Name) | Type | Technical Role | Payload Impact | Minimal / Recommended |
|---|---|---|---|---|
| Webhook UUID (placeholder) | string | Identifies which AlgoWay webhook should receive the alert. This must match the webhook you created in AlgoWay. | Sets uuid field in JSON. |
Minimal: non-empty string. Recommended: copy/paste exact UUID from AlgoWay dashboard. |
| Platform (placeholder) | enum | Selects the destination connector behavior (MT5 / cTrader / TradeLocker / Crypto exchange etc.). | Sets platform field in JSON. |
Minimal: one valid platform value. Recommended: keep one platform per alert route. |
| Symbol Mapping / Override (placeholder) | string | Overrides TradingView ticker with broker/exchange symbol when they differ. | Affects symbol field in JSON. |
Minimal: empty (use TV ticker). Recommended: set mapping only when required. |
| Input (Menu Name) | Type | Technical Role | Payload Impact | Minimal / Recommended |
|---|---|---|---|---|
| Long Signal Source (placeholder) | source | The indicator output line/value that defines a bullish trigger. Can be event-based (1) or value-based. | Controls when task becomes buy. |
Minimal: connect to any output that represents long trigger. Recommended: connect to event output (single-bar trigger). |
| Short Signal Source (placeholder) | source | The indicator output line/value that defines a bearish trigger. | Controls when task becomes sell. |
Minimal: connect to any output that represents short trigger. Recommended: connect to event output (single-bar trigger). |
| Signal Threshold / Comparator (placeholder) | float / enum | Defines how source values become a boolean (e.g., > 0, == 1, cross). | Changes the timing and frequency of buy/sell tasks. |
Minimal: keep default comparator. Recommended: use strict comparators for non-event sources. |
| Input (Menu Name) | Type | Technical Role | Payload Impact | Minimal / Recommended |
|---|---|---|---|---|
| Enable Confirmation (placeholder) | bool | Turns on/off the confirmation layer entirely. | When OFF, confirmation does not gate task. |
Minimal: OFF for quick wiring test. Recommended: ON for live automation. |
| Long Confirmation Source (placeholder) | source | A value/line that must validate a bullish entry (trend permission). | Gates task=buy in final_long_ok. |
Minimal: connect to trend sign or slope. Recommended: higher-timeframe trend permission. |
| Short Confirmation Source (placeholder) | source | A value/line that must validate a bearish entry. | Gates task=sell in final_short_ok. |
Minimal: connect to trend sign or slope. Recommended: higher-timeframe trend permission. |
| Confirm Combine Logic (placeholder) | enum | Defines if Signal and Confirmation are combined by AND or OR. | Changes when buy/sell is allowed. |
Minimal: AND. Recommended: AND (strict gate). |
| Input (Menu Name) | Type | Technical Role | Payload Impact | Minimal / Recommended |
|---|---|---|---|---|
| Enable Filter (placeholder) | bool | Turns on/off the filter layer entirely. | When OFF, filter does not gate tasks. |
Minimal: OFF for first test. Recommended: ON for noisy instruments. |
| Filter Source (placeholder) | source | A condition input that must be “OK” for entries (volatility/session/spread proxy). | Blocks buy/sell tasks when filter fails. |
Minimal: connect to a stable condition. Recommended: volatility regime filter. |
| Filter Comparator (placeholder) | float / enum | Defines what “filter ok” means (e.g., > 0, == 1). | Changes blocking behavior. |
Minimal: keep default. Recommended: use strict equality for event filters. |
| Input (Menu Name) | Type | Technical Role | Payload Impact | Minimal / Recommended |
|---|---|---|---|---|
| Stop Loss (pips) (placeholder) | int/float | Defines SL distance in pips for risk exits. | Sets sl_pips in JSON when enabled. |
Minimal: 0 (disabled). Recommended: instrument-dependent, must exceed spread spikes. |
| Take Profit (pips) (placeholder) | int/float | Defines TP distance in pips for risk exits. | Sets tp_pips in JSON when enabled. |
Minimal: 0 (disabled). Recommended: align to system expectancy. |
| Trailing (pips) (placeholder) | int/float | Defines trailing stop in pips. | Sets trail_pips in JSON when enabled. |
Minimal: 0 (disabled). Recommended: enable only for trend systems. |
| Risk / Size (placeholder) | float / enum | Defines sizing rule alignment between strategy and alerts. | Sets risk (or size field) in JSON. |
Minimal: use default strategy sizing. Recommended: keep consistent with AlgoWay side sizing rules. |
| Input (Menu Name) | Type | Technical Role | Payload Impact | Minimal / Recommended |
|---|---|---|---|---|
| Enable Flat Task (placeholder) | bool | Enables explicit flat (close) tasks based on logic exits. | Allows task to become flat. |
Minimal: OFF for entry-only tests. Recommended: ON for realistic automation. |
| Close Source (placeholder) | source | A dedicated input that triggers a close condition. | Converts close event into task=flat. |
Minimal: none (disabled). Recommended: use if your indicator provides explicit close/exit markers. |
| Reverse Policy (placeholder) | enum | Defines how opposite signals are handled (reverse vs flat vs ignore). | Changes task emission order and flat behavior. |
Minimal: reverse. Recommended: flat-on-neutral, reverse-on-confirmed. |
To make every row above 100% exact (names, group labels, defaults, and field mapping), paste the Pine source code from the “Source code” tab. Then this table becomes a literal code-to-documentation mapping, with no placeholders.
| System State | Condition | Task Emitted | Meaning for AlgoWay |
|---|---|---|---|
| Bull Entry | final_long_ok becomes true | buy |
Open/maintain long according to webhook mode |
| Bear Entry | final_short_ok becomes true | sell |
Open/maintain short according to webhook mode |
| Neutral Close | close condition or neutral state triggers | flat |
Close position (full close) |
Send the full Pine source code from the TRALADAL “Source code” tab. Then this page will be updated to: