Open Portal

Syntax Generator

Build TradeSgnl signals in a guided form instead of typing syntax. Set entries, exits, stops, take profits and trailing, send a test, and copy the message.

Introduction

The Syntax Generator is a visual form in the TradeSgnl Portal that builds signals for you. Pick your symbol, action, risk, and any optional parameters; the generator emits the exact text TradingView (or any other webhook source) needs to send. It also has a one-click Send button that fires a signal straight to your account, so you can verify your setup before touching TradingView at all.

Every setting on the form and what it does on your account, from sizing and stops to the Automation Wizard and presets (9:40)

No syntax to memorize

Every parameter has a labeled field with units, types, and inline validation. No more guessing whether to write sl= or sl_pips=.

Test before you trade

Click Send to fire the configured signal directly at your account. The trade appears within seconds, no TradingView account required.

Reusable presets

Save a configured strategy once and load it in a click. Useful for managing multiple strategies on one license.

Open Syntax Generator
Syntax Generator interface in the TradeSgnl Portal
The Syntax Generator: configure your settings, preview the generated signal.

Verify Your Setup with Send

The fastest way to confirm your license and account are working is to press Send on the generator's Entry signal. This skips TradingView entirely, so you can isolate "is my account receiving signals?" from "is my TradingView alert configured correctly?".

Open the Syntax Generator. In the Portal, open Tools → Syntax Generator (or visit it directly).

Open Syntax Generator

Pick your license. Select your license from the License ID dropdown. This determines which terminal the signal goes to.

Fill the minimum fields. You only need three things to send a test trade:

  • Symbol. Any instrument your account can trade. BTCUSD is a safe default because it's tradable 24/7 and most brokers carry it.
  • Action. Pick Buy from the dropdown. You can close it later.
  • Risk/Volume. A tiny lot size like 0.01 (with the unit set to Lots) keeps the test cheap.

Click Send. On the ENTRY row of the preview box at the top (blue left border), click the Send button next to the copy icon. The generator sends the configured signal straight to your account and confirms with a notification.

What if the button is disabled?

Send is greyed out until License ID, Symbol, Action, and Risk/Volume are all set (on the Pending Orders tab, Pending Level too). Hover the button to see which field is still missing.

Check your account. Open your trading platform. A buy position for the symbol you picked should appear within a few seconds.

  • Trade appeared? Your license and connection are working. Close the trade manually when you're done.
  • No trade? Jump to Troubleshooting. The most common causes are: EA not attached to a chart, License ID mismatch, or the symbol isn't visible in Market Watch.

Test passed?

You now have a verified pipeline from Portal → Server → EA. Anything that fails after this point is on the TradingView side (alert message, webhook URL, account plan).

The Interface at a Glance

The page has three tabs that switch what kind of order you're building. Your License, Symbol and Comment carry over when you switch.

TabUse it for
Market OrdersImmediate entries at current price: buy, sell, and reversal commands (close-then-buy / close-then-sell).
Pending OrdersOrders that fire when price reaches a level you set: buy stop, buy limit, sell stop, sell limit.
Modify OrdersChanging trades that already exist: the stop loss, take profit or entry of open positions and unfilled pending orders, without closing them.

Below the tabs, you'll see:

  • A preview box with an ENTRY row (blue left border) and an EXIT row (orange left border). Each row shows the live generated signal text and has its own copy icon and Send button. The Modify Orders tab shows a single MODIFY row instead, since a modify has no exit half.
  • Three buttons on the Market and Pending tabs: Custom Strategy Message (one alert handles entries, exits, and reversals), Strategy Builder Preset (text for the Strategy Builder's settings), and TradingView Automation Wizard (asks what you're automating and walks you through the setup). See Output Options and TradingView Automation Wizard.
  • The configuration card with three grouped sections: shared fields, Entry Signal, and Exit Signal. Trailing Stop and Breakeven sit inside the Entry Signal section.
  • Header actions to the right of the tabs: a clear (X) button, Save Preset, and Saved Presets. See Saved Presets.
  • An info panel under the form with the webhook URL and the {{strategy.order.alert_message}} placeholder, each with a copy button.

Configuring a Signal

What Default means

Every unit picker (Risk/Volume, Stop Loss, Take Profit, Partial Close, Pending Level, Trailing, Breakeven) starts on Default. Default means the EA's own setting applies, so the signal carries no explicit unit. Pick Lots, Pips, Price or another unit to override the EA for that one signal.

Shared Fields

These apply to all three tabs and to both entry and exit signals.

FieldWhat it doesTip
License IDWhich terminal receives the signal.Required for any copy or test action.
SymbolThe instrument to trade (EURUSD, BTCUSD, XAUUSD).Leave blank to insert the TradingView placeholder {{ticker}} automatically. Send needs a symbol, so fill it in to test.
CommentNames the strategy the trade belongs to. The EA groups trades by symbol and comment, and scopes close signals, pyramid targets, hedge protection, Direction Lock, and the DCA Filter to that group.Fill it in on every signal. Without it, one strategy's closeall closes another strategy's positions. See Multiple Strategies.

Market Orders

The Market Orders tab handles immediate entries and reversal-style commands.

Action options:

  • Buy / Sell. Open a new position at market price.
  • Close Long Then Buy / Sell. Close any existing long positions, then open the chosen direction. Useful for "always be in a position" strategies.
  • Close Short Then Buy / Sell. Same idea, but closes shorts first.

Risk / Volume. Number input plus a type selector that determines how the number is interpreted:

TypeWhat the value meansNotes
DefaultUses the EA's own volume setting.Pick this if you don't want to override per signal.
LotsExact lot size (0.5 = half a standard lot).
% Balance / % EquityLot size as a percent of balance or equity.
Dollar RiskRisk a fixed dollar amount if the trade hits SL.Requires SL.
% Bal Loss / % Eq LossLose this percent of balance/equity at SL.Requires SL.

Stop Loss & Take Profit. Each has a number and a unit selector: Default, Pips, Currency, Price or Percent.

UnitWhat the value means
DefaultUses the EA's own unit.
PipsDistance in pips.
CurrencyA price distance (5 = 5.00 on the price). Handy for indices, gold and crypto.
PriceAn exact price level.
PercentA percentage of the price (1 = 1%).

The generator emits the correct explicit parameter (sl_pips=, sl_points=, sl_price=, tp_percent=, etc.) so you don't need to remember the naming.

Multi-level take profit with partials. Once the Take Profit field has a value, a plus icon appears next to it. Click it to add another level, and use the minus icon to remove the last one. Each level has its own Partial Close, so a single signal can scale out at multiple targets. Later levels follow the unit you picked on the first one.

Partial Close has its own unit selector. Percent is a share of what is still open, between 0 and 1 (0.5 closes half). Lots closes that many lots and needs EA 0.77 or newer. Default reads the value through the EA's Partial Close Type input.

Pending Orders

The Pending Orders tab adds a Pending Level field. Risk, Stop Loss, trailing, breakeven, Pyramid and Recovery work the same way. It has a single Take Profit field with no Partial Close, and the exit toggles are not shown.

Pending Orders tab with the Pending Level field above SL and TP
Pending Orders adds a Pending Level field and uses a single Take Profit.

Action options: Buy Stop, Buy Limit, Sell Stop, Sell Limit.

Pending Level has its own type selector:

TypeWhat the value means
DefaultUses the EA's "Pending Order Entry" setting.
PipsDistance in pips from current price.
PriceAbsolute price level.
PercentPercentage offset from current price.

Auto-correction

If you set an absolute price that doesn't match the order type (e.g., a Buy Stop below current price), the EA quietly converts it to the correct order type at execution time. You don't need to worry about getting it backwards.

Exit Signal

The Exit section (orange border) builds the closing half of a strategy. The generator auto-suggests an exit action based on your entry action (Buy → Close Buy, Sell → Close Sell, Close Long Then Buy → Close Buy, Buy Stop or Buy Limit → Cancel Long Orders, etc.), but you can change it. Close All is never suggested, pick it yourself if you want it.

Exit ActionCloses
Close BuyAll long positions for the symbol (and Comment). (Market tab)
Close SellAll short positions for the symbol (and Comment). (Market tab)
Close AllEvery open position for the symbol, regardless of direction. (Market tab)
Cancel Long OrdersPending buy stop / buy limit orders. (Pending tab)
Cancel Short OrdersPending sell stop / sell limit orders. (Pending tab)

Partial Close. Optional, Market tab only. Use it to close only part of the position. Percent is a share between 0 and 1 (0.5 = 50%), Lots is an exact lot size, and Default follows the EA's Partial Close Type input. Leave it empty to close the full position.

The Exit row's Send button needs only a License ID and an Exit Action.

Modify Orders

The Modify Orders tab changes trades that already exist, without closing them. It builds one MODIFY signal rather than an entry and exit pair, so there is a single preview box.

Modify Orders tab with the Modify Signal card showing Action, Stop Loss, Take Profit, Partial Close and the Move SL to Entry toggle
The Modify Orders tab. Only the fields you fill in are sent, so everything you leave blank stays as it is.

Action options:

ActionChanges
Modify Long PositionsOpen buy positions for the symbol.
Modify Short PositionsOpen sell positions for the symbol.
Modify Buy Stops / Modify Buy LimitsUnfilled pending buy orders of that type.
Modify Sell Stops / Modify Sell LimitsUnfilled pending sell orders of that type.

Stop Loss, Take Profit and Partial Close work as they do on the Market tab, each with its own unit selector and a multi-level Take Profit. The difference is that blank means "leave alone" rather than "use the EA default". Only the levels you actually fill in are sent, and a modify ignores the EA's own SL/TP settings entirely. Send and Copy both need a License ID, an Action and at least one level (Send also needs a Symbol).

New take profit levels replace the targets not reached yet. Targets already hit stay closed.

Move SL to Entry. This toggle emits sl=entry, which moves the stop of each open position to its own entry price rather than to one shared level. It replaces the Stop Loss value (the field greys out while the toggle is on). It applies to positions only, so it is not shown when the action is a pending order type.

When the action is a pending order type, a New Entry field appears and takes the same unit selector as Pending Level on the Pending Orders tab (Default, Pips, Price, Percent). Leave it blank to keep the order's current entry. Changing only the entry leaves that order's stop loss and take profit where they are.

The Modify tab has no trailing, breakeven, Pyramid or Recovery controls and no Save Preset button. The Saved Presets menu is still available.

Set a Comment

Without a Comment, a modify changes every matching position or order on the symbol, including trades opened by your other strategies. Fill it in whenever the account runs more than one. See Multiple Strategies.

Needs EA 0.68 or newer

Modify commands need EA 0.68. An older EA rejects the signal with error 7021. See Modify Orders in the signal reference for the full parameter list.

Trailing, Breakeven and Flags

On the Market and Pending tabs these controls sit in the Entry Signal section, always visible. Pyramid, Recovery, Step Stop and the exit toggles are a row of switches under the entry fields. Step Stop adds stepsl: each take profit reached moves the stop up one level, TP1 to entry and TP2 to TP1 (see Step Stop; on MetaTrader it needs EA 0.85 or newer). Trailing Stop and Breakeven are two cards below them: switch a card on to fill it in, and switch it off to clear its values.

Exit toggles, Pyramid and Recovery switches, and the Trailing Stop and Breakeven cards switched on
The toggle row with the Trailing Stop and Breakeven cards below it.

Trailing Stop

FieldWhat it does
Trailing TriggerProfit needed before trailing kicks in. Its unit selector sets the unit for all three values.
Trailing DistanceHow far behind price the SL trails.
Trailing StepMinimum price movement before SL re-adjusts.

The unit selector options:

UnitHow the three values are read
DefaultIn the EA's own Distance Unit.
PipsAll three in pips.
CurrencyAll three are price distances (5 = 5.00).
PriceThe trigger is an exact price level. Distance and step are price moves.
PercentAll three are percentages of the price (1 = 1%).

All three values are required

Trigger, distance and step must all be filled in. Until they are, trailing stays off and the card shows a reminder, so nothing is added to the signal.

Breakeven

FieldWhat it does
Breakeven TriggerWhat moves the stop to your entry. Pick a unit (Default, Pips, Currency, Price or Percent) and enter the profit needed, or pick Price to move the SL once an exact price level is reached.
Breakeven OffsetHow far past entry to place the SL, in the trigger's unit. 0 (or blank) is true breakeven, a small positive value locks in a little profit.

TP Level is an extra trigger option. Instead of a distance, you pick one of the signal's own take profits (TP1, TP2, ...) and the stop moves once that target is reached. The list offers every take profit except the last, because the trade closes there. It needs at least two take profits, so in practice it is a Market tab option. The Offset then gets a unit selector of its own, since the trigger's unit belongs to the take profit.

Pyramid

Toggle to include the py flag. This does not open trades by itself. It tells the EA to manage every trade sharing this signal's symbol and Comment as one coordinated group, with a combined breakeven and a shared profit target, using the rules configured in EA Settings → Pyramid Management. Your strategy still sends each individual entry.

The flag is read once per strategy

py takes effect only on the signal that opens a strategy. Later signals with the same Comment inherit it, so untoggling Pyramid here will not stop pyramid management on a strategy whose trades are already open. Close the group first, or change the Comment.

How pyramiding works

Recovery

Toggle to include the re flag. The EA opens additional positions in the same direction as the trade moves against you, using the rules configured in EA Settings → Recovery Management.

How recovery works

Recovery increases exposure

Recovery trades grow your position size each level. Read the Recovery System page before enabling.

Exit Controls

Three toggles on the Market Orders tab change how the EA treats opposite-direction positions when the entry fires:

ToggleBehavior
Exit on OppositeClose opposite positions, then stop (no new trade).
Exit on EntryClose opposite positions, then open the new trade (reversal).
Ignore Exit SignalsDrop this strategy's close commands (Close Buy, Close Sell, Close All) server-side. Entries, reversals and pending-order cancels still go through. Useful if you want the strategy's entries but the EA's TP/SL/trailing to handle exits.

Exit on Opposite and Exit on Entry are mutually exclusive: switching one on switches the other off.

Cancel at TP1

A toggle on the Pending Orders tab that adds cancel_at=tp1. If price reaches the order's first take profit before the order fills, the EA cancels the order, so it never fills late on a move that is already over. It needs a MetaTrader account on EA 0.80 or newer. See Cancel at TP1 for the full rules.

Output Options

The generator gives you several ways to take a configured signal into TradingView. Pick based on what is sending the alert.

Which Alert Message to Use

What goes in a TradingView alert's Message field depends on what sends the alert:

Your alert comes fromMessage to paste
The TradeSgnl Strategy Builder{{strategy.order.alert_message}}, with the Strategy Builder Preset pasted into the Builder's Signal Preset field
A strategy written or adapted for TradeSgnl, for example in Strategy Lab{{strategy.order.alert_message}}
Any other Pine Script strategy, including invite-only and protected scripts you cannot editThe Custom Strategy Message, with the alert's trigger set to Order fills only
An indicator, an alert condition, or a price or drawing alertThe Entry or Exit signal, one alert per signal

{{strategy.order.alert_message}} only works with a script that writes TradeSgnl signals into its orders. Any other strategy leaves it empty or fills it with its own text, which TradeSgnl cannot read, so nothing trades. The info panel under the form shows this placeholder with a copy button.

Entry & Exit Signals

The ENTRY and EXIT rows at the top show the individual entry and exit signal text. Use each row's copy icon to grab one signal at a time. Copy needs a License ID and, on the Entry row, a Risk/Volume value (plus Pending Level on the Pending tab). The Exit row needs an Exit Action.

When to use: indicator alerts, and price or drawing alerts, where you create one TradingView alert per signal (or you're integrating with something other than TradingView).

LicenseID,EURUSD,buy,risk=0.01,sl_pips=30,tp_pips=60

Custom Strategy Message

Click Custom Strategy Message to copy a single message that handles entries, exits, and reversals. It carries your Entry settings (risk, SL, TP and so on) and uses TradingView's {{strategy.prev_market_position}}>{{strategy.market_position}} placeholder, which the TradeSgnl server translates into the right action verb (flat>long → buy, long>flat → closebuy, long>short → closelongsell, etc.).

Custom Strategy Message button in the Syntax Generator
One click copies the unified message that handles every signal type from one alert.

When to use: any TradingView strategy that was not built or adapted for TradeSgnl, including invite-only and protected scripts you cannot edit. You create one alert that handles every signal the strategy fires. In TradingView, set the alert's trigger to Order fills only.

LicenseID,{{ticker}},{{strategy.prev_market_position}}>{{strategy.market_position}},risk=0.01,sl_pips=30,tp_pips=60
Full no-code setup walkthrough

Strategy Builder Preset

Click Strategy Builder Preset to copy a preset for pasting into the TradeSgnl Strategy Builder's settings. The preset is a short block of text with one line each for the long and short entry, exit, take profit and stop loss messages, built from your Entry and Exit settings. The opposite direction is mirrored for you. The Builder is a Pine Script that runs on your TradingView chart and reads the preset to generate signals; you only need to set your alert message to the {{strategy.order.alert_message}} placeholder shown in the info panel at the bottom of the page. That placeholder works only with the Builder or a script adapted for TradeSgnl; see Which Alert Message to Use.

Strategy Builder Preset button in the Syntax Generator
Copy the full preset and paste it into the Strategy Builder's Signal Preset field on your chart.

When to use: you're using the TradeSgnl Strategy Builder to wire any indicator or strategy into automated trading.

Strategy Builder setup

Strategy Lab (adapted scripts)

Strategy Lab has no button on this page. When you adapt a script in Strategy Lab, the script gets four alert-message inputs (Long Entry, Long Exit, Short Entry, Short Exit). The Automation Wizard fills in those four signals from your form, and the alert's Message is {{strategy.order.alert_message}}.

TradingView Automation Wizard

Click TradingView Automation Wizard (the filled button next to the two copy buttons) to open a side panel that asks what you're automating and ends on the exact steps and messages to use. It uses the signal you have configured on the form, so set that up first. The button stays disabled until a license is selected.

QuestionAnswers and where they lead
What are you trying to automate?Strategy (has a Properties tab and a Strategy Tester) or Indicator (draws lines, shapes or signals).
Do you have access to the strategy's source code? (Strategy)No, it's locked goes to Custom Strategy Setup. Yes, I have the source code asks the next question.
How do you want to set up the alert? (Strategy with source code)TradeSgnl Strategy Lab (recommended) goes to Strategy Lab Adaptation. Custom Strategy Message goes to Custom Strategy Setup.
Does your indicator have built-in alerts? (Indicator)No, it's just lines/shapes goes to Strategy Builder Setup. Yes, it has built-in alerts asks the next question.
How do you want to automate this? (Indicator with alerts)Use Strategy Builder (recommended) goes to Strategy Builder Setup. Setup Multiple Alerts asks the next question.
Is this a continuous reversal indicator?Yes (Reversal System) or No (Standalone Signals), both go to Multiple Native Alerts. A reversal system gets the exent flag added to its buy and sell messages.

Each result page is a short step list with copy boxes:

  • Custom Strategy Setup. Create the alert on your strategy with Order fills only, paste the Custom Strategy Message, then add the webhook URL.
  • Strategy Lab Adaptation. Open Strategy Lab and adapt your script, paste the four signals into the script's settings, set the alert Message to {{strategy.order.alert_message}}, then add the webhook URL.
  • Strategy Builder Setup. Get access to the Builder, paste the Strategy Builder Preset into its Signal Preset field, create the alert on the Builder with {{strategy.order.alert_message}}, then add the webhook URL.
  • Multiple Native Alerts. Create one alert per signal on the indicator's own conditions, pasting the buy syntax into the buy alert and the sell syntax into the sell alert, then add the webhook URL to each.

Click any answer in the breadcrumb at the top of the panel to go back or switch to a different answer. The panel also links to the TradeSgnl Chrome extension for people who would rather skip the wizard.

Saved Presets

Once a configuration is dialed in, save it for later.

Save a preset. Click Save Preset in the header, to the right of the tabs. The generator suggests a name built from your symbol, size and comment (for example XAUUSD_0.2_TradeSgnl-Gold). Edit it and click Save. Presets store a strategy (an entry with its exit), so the button is not shown on the Modify Orders tab.

Save Preset popover with a suggested name
The preset name is suggested for you, so you rarely need to type it.

Load a preset. Click Saved Presets in the header to see your saved configurations grouped as Market Strategies and Pending Strategies. Click any preset to load it into the form. The tab switches to match, and the menu button shows the loaded preset's name.

Presets dropdown menu showing saved configurations grouped by order type
Saved presets appear grouped by Market vs Pending so the list stays scannable as it grows.

Update or delete. When you edit a loaded preset, the Save button changes to Save Changes. Click it to Update that preset, or enter a new name and click Save as New to keep the original. The bin icon next to each preset in the Saved Presets menu deletes it: click it once, then click the tick it turns into to confirm.

Save Changes popover with Update and Save as New
Editing a loaded preset offers Update, so you don't accidentally create duplicates.

Multi-strategy workflow

Saved presets pair well with the Comment field. Save one preset per strategy (each with its own comment=Strategy1, comment=Strategy2, etc.) so close commands cleanly target the right positions later.

Where to Use the Output

The Generator has several outputs because there are several ways to automate with TradeSgnl. Pick the card that matches what you're automating. Each one links to a full setup guide that covers TradingView alert configuration, webhook URLs, and any strategy-side wiring you need.

Webhook URL is always the same

Every TradingView webhook alert points at https://webhook.tradesgnl.com in the Notifications tab. The message body is what changes per setup. On a paid TradingView plan, alerts reach TradeSgnl by webhook. On a free plan, install the TradeSgnl Chrome extension, turn on Forward alerts to TradeSgnl in its menu, and keep TradingView open: the extension sends your alerts to TradeSgnl the moment they fire.

Frequently Asked Questions

On this page