TradeSgnl Logo
Docs
Portal

TradeSgnl EA Signal Guide

Learn how to format and send signals to the TradeSgnl Expert Advisor.

The TradeSgnl EA receives signals through webhooks and executes them on your MT5 platform. Each signal uses a comma-separated format, allowing you to control all aspects of your trades.

Tip
Our signals format works with TradingView alerts, making it easy to automate your trading strategies.

EA Settings and Signal Parameters


The TradeSgnl EA has settings that determine which parameters it uses for trades:

Feature Control Settings

Advanced features can be controlled by either signals or EA settings:

FeatureEA SettingSignal Parameter
Trailing StopTrailing Mode: Disabled/Enabled/Signal

trtrig, trdist, trstep (requires Signal mode in EA)

Pyramid TradingPyramid Mode: Disabled/Enabled/Signal

py (requires Signal mode in EA)

Recovery SystemRecovery Mode: Disabled/Enabled/Signal

re (requires Signal mode in EA)

Tip
Important: For any feature to be controlled via signal parameters, the corresponding EA setting MUST be set to "Signal". Otherwise, the signal parameters for these features will be ignored.

Signal Format


TradeSgnl uses a comma-separated format with required and optional parameters:

LicenseID,SYMBOL,ACTION,risk=VOLUME,[OPTIONAL_PARAMS]
Signal Structure

Each signal consists of 4 required components followed by optional parameters:

  1. LicenseID - Your unique license identifier (e.g., LicenseID)

  2. SYMBOL - The trading instrument (e.g., EURUSD, BTCUSD)

  3. ACTION - The trading action (buy, sell, buystop, etc.)

  4. VOLUME - Trading size with risk= prefix (e.g., risk=0.01)

  5. OPTIONAL PARAMETERS - Additional settings (sl=, tp=, comment=, etc.)

Format Rules
  • Parameters are separated by commas with NO spaces

  • All parameters are case-insensitive (buy = BUY)

  • Optional parameters can be in any order

  • Values are assigned with equals sign (sl=30)

  • Risk can be in lots (risk=0.01) or percentage (risk=1)

Optional Parameters


Enhance your signals with these optional parameters:

ParameterDescriptionExample

sl=

Stop Loss in pips from entry price

sl=50

tp=

Take Profit in pips from entry price

tp=100

pending=

Pending order level (interpretation depends on EA setting)

pending=20

trtrig=

Pips needed to activate trailing stop

trtrig=20

trdist=

Trailing stop distance in pips

trdist=10

trstep=

Pips needed to move trailing stop

trstep=5

betrig=

Pips needed to activate breakeven

betrig=15

bedist=

Breakeven distance in pips

bedist=2

comment=

Comment for the trade

comment=Strategy1

py

Enable pyramid trading mode

py

re

Enable recovery mode

re

Market Orders


Market order commands allow you to immediately enter or exit positions at current market prices.

buy (or long)

Places a buy order at the current market price.

LicenseID,EURUSD,buy,risk=0.01
sell (or short)

Places a sell order at the current market price.

LicenseID,EURUSD,sell,risk=0.01
closebuy (or closelong)

Closes all buy positions for the specified symbol.

LicenseID,EURUSD,closebuy
closesell (or closeshort)

Closes all sell positions for the specified symbol.

LicenseID,EURUSD,closesell
closeall

Closes all open positions. Can optionally filter by comment to close only specific strategy positions.

LicenseID,EURUSD,closeall

With Comment Filter:

LicenseID,EURUSD,closeall,comment=Strategy1
Tip
When using closeall with a comment filter, only positions that have the exact matching comment will be closed. If no comment is provided, ALL open positions will be closed regardless of their comment or symbol.

Replace Orders


Replace orders allow you to close existing positions and immediately open new positions in a single signal. This includes both same-direction updates and trend reversal strategies.

Tip
Note: If no existing positions are found to close, the command will still open the new position with the specified parameters. This means you can safely use these commands even when you're not sure if there are existing positions to close.
Reverse Direction Commands
closelongsell

Closes all long (buy) positions for the specified symbol (optionally filtered by comment), then opens a new sell (short) position using the provided parameters.

LicenseID,GBPUSD,closelongsell,risk=0.02,sl=40,tp=80,comment=Strategy2
closeshortbuy

Closes all short (sell) positions for the specified symbol (optionally filtered by comment), then opens a new buy position using the provided parameters.

LicenseID,EURUSD,closeshortbuy,risk=0.01,sl=30,tp=50,comment=Strategy1
Same Direction Commands
closelongbuy

Closes all long (buy) positions for the specified symbol (optionally filtered by comment), then opens a new buy position using the provided parameters.

LicenseID,EURUSD,closelongbuy,risk=0.01,sl=30,tp=50,comment=Strategy1
closeshortsell

Closes all short (sell) positions for the specified symbol (optionally filtered by comment), then opens a new sell (short) position using the provided parameters.

LicenseID,GBPUSD,closeshortsell,risk=0.02,sl=40,tp=80,comment=Strategy2
Tip
Comment Filtering: When using the comment parameter, only positions with the matching comment will be closed. If no comment is provided, all positions of the that symbol with the specified direction will be closed.
Common Trading Scenarios

Trend Reversal Strategy: Use closelongsell or closeshortbuy when your strategy signals a trend reversal.

Position Management: Use closelongbuy or closeshortsell to update existing positions with new parameters without manually closing first.

Risk Management: These commands are particularly useful for automated strategies that need to quickly adapt to changing market conditions.

Pending Orders


Pending order commands allow you to set orders that will be executed when price reaches a specific level.

buystop

Places a buy stop order above the current market price. The pending= parameter is required.

LicenseID,EURUSD,buystop,risk=0.01,pending=20,sl=30,tp=50
buylimit

Places a buy limit order below the current market price. The pending= parameter is required.

LicenseID,EURUSD,buylimit,risk=0.01,pending=20,sl=30,tp=50
sellstop

Places a sell stop order below the current market price. The pending= parameter is required.

LicenseID,EURUSD,sellstop,risk=0.01,pending=20,sl=30,tp=50
selllimit

Places a sell limit order above the current market price. The pending= parameter is required.

LicenseID,EURUSD,selllimit,risk=0.01,pending=20,sl=30,tp=50
pending=

Required parameter for all pending orders. Specifies the price level for the pending order.

pending=20 (20 pips from current price)\npending=1.1050 (specific price level)
Tip
The interpretation of the pending parameter depends on the "Pending Order Entry" setting in the EA:
  • Pips From Current: The value is treated as the number of pips away from current price

  • Absolute Price: The value is treated as the exact price level for the order

cancellong

Cancels all pending buy orders (buystop and buylimit) for the specified symbol.

LicenseID,EURUSD,cancellong
cancelshort

Cancels all pending sell orders (sellstop and selllimit) for the specified symbol.

LicenseID,EURUSD,cancelshort

Advanced Features


Advanced parameters that enhance your trading signals with features like trailing stops, breakeven levels, and more.

Trailing Stop

Add trailing stop functionality to your trades using these parameters together.

LicenseID,EURUSD,buy,risk=0.01,sl=30,tp=50,trtrig=20,trdist=10,trstep=5

trtrig=

Trailing stop will be activated after the trade gains this number of pips. For example, with trtrig=20, the trailing stop will activate after price moves 20 pips in your favor.

trdist=

Distance in pips to maintain between the current price and the trailing stop. For example, with trdist=10, the stop loss will be placed 10 pips away from the current price.

trstep=

Minimum price movement in pips required to adjust the trailing stop. For example, with trstep=5, the stop loss will only move after the price moves at least 5 pips.

Breakeven

Automatically move your stop loss to breakeven level when price reaches a certain point.

LicenseID,EURUSD,buy,risk=0.01,sl=30,tp=50,betrig=15,bedist=2

betrig=

Breakeven will be activated after the trade gains this number of pips. For example, with betrig=15, the breakeven will activate after price moves 15 pips in your favor.

bedist=

Distance in pips from the entry price to place the stop loss after breakeven is triggered. With bedist=2, the stop loss will be placed 2 pips in profit from your entry.

Pyramid Trading

Configure pyramid trading strategies with multiple entries.

LicenseID,BTCUSD,buy,risk=0.01,sl=500,tp=2000,py

py

Flag to enable pyramid trading mode. Requires the EA to have the Pyramid Mode set to "Signal" in settings. All pyramid configuration settings are controlled from the EA.

Recovery Mode

Enable recovery system for managing losing positions.

LicenseID,EURUSD,buy,risk=0.01,sl=30,tp=50,re

re

Flag to enable the recovery system. Requires the EA to have the Recovery Mode set to "Signal" in settings. All recovery configuration settings are controlled from the EA.

Signal Examples


Here are examples of different signal formats for various trading scenarios:

Market Buy Order
LicenseID,EURUSD,buy,risk=0.01

Simple buy order for EURUSD with 0.01 lots

Market Sell Order
LicenseID,GBPUSD,sell,risk=0.01

Simple sell order for GBPUSD with 0.01 lots

Close Specific Position Type
LicenseID,EURUSD,closebuy

Close all buy positions for EURUSD

Close All Positions
LicenseID,EURUSD,closeall

Close all open positions regardless of symbol or direction

Close All Positions with Comment
LicenseID,EURUSD,closeall,comment=Strategy1

Close all positions that have the comment "Strategy1"

Close Long Then Open Buy
LicenseID,EURUSD,closelongbuy,risk=0.01,sl=30,tp=50,comment=Strategy1

Closes all long positions, then opens a new buy with provided parameters

Close Short Then Open Sell
LicenseID,GBPUSD,closeshortsell,risk=0.02,sl=40,tp=80,comment=Strategy2

Closes all short positions, then opens a new sell with provided parameters

Buy with Stop-Loss and Take-Profit
LicenseID,EURUSD,buy,risk=0.01,sl=30,tp=50

Buy order with 30 pips stop-loss and 50 pips take-profit

With Trailing Stop
LicenseID,USDJPY,buy,risk=0.05,sl=20,tp=60,trtrig=30,trdist=15,trstep=3

Buy order with trailing stop that activates after 30 pips in profit

Breakeven Example
LicenseID,EURUSD,buy,risk=0.01,sl=30,tp=60,betrig=20,bedist=2

Buy order with breakeven that activates after 20 pips in profit

Buy Stop Pending Order
LicenseID,EURUSD,buystop,risk=0.01,pending=20,sl=30,tp=50

Buy stop order 20 pips above current price

Cancel Pending Orders
LicenseID,EURUSD,cancellong

Cancel all pending buy orders for EURUSD

Pyramid Trading Strategy
LicenseID,BTCUSD,buy,risk=0.01,sl=500,tp=2000,py

Buy order with pyramid trading enabled, allowing up to 3 entries

Recovery Mode
LicenseID,EURUSD,buy,risk=0.01,sl=30,tp=50,re

Buy order with recovery mode enabled

Parameter Processing Rules


When processing signals, the TradeSgnl EA follows these rules:

Symbol Names

Symbol names in signals must match exactly with the symbol names in your MT5 terminal. For example, if your broker uses "EURUSD.a" in Market Watch, your signal must use the same format.

LicenseID,EURUSD.a,buy,risk=0.01
Tip
Alternatively, you can use our Symbol Mapping feature to map symbol names to the correct broker-specific symbols.
Risk-Based Sizing

When using percentage-based risk (e.g., risk=1), the lot size is calculated as a percentage of your account balance or equity, depending on the EA's settings. The sl= parameter is not required for this calculation.

Tip
Example: With risk=1 on a $10,000 account, a 1 lot position will be opened (0.1 lot for a $1,000 account, or 10 lots for a $100,000 account).

Valid Action Types


The EA supports the following action types in signals:

CategoryAction TypesDescription
Market Orders

buy, long, sell, short

Immediate market entry orders
Closing Positions

closebuy, closelong, closesell, closeshort, closeall

Close existing positions by type or all positions
Replace Orders

closelongbuy, closelongsell, closeshortbuy, closeshortsell

Close one side and immediately open the specified direction with given parameters
Pending Orders

buystop, buylimit, sellstop, selllimit

Orders that execute at specified price levels
Cancel Orders

cancellong, cancelshort

Cancel pending orders by type

Signal Format Cheat Sheet


Here's a comprehensive quick reference guide for all signal formats. Use this as your go-to cheat sheet for creating trading signals:

ActionFormat
Market Buy

LicenseID,SYMBOL,buy,risk=VOLUME

Market Sell

LicenseID,SYMBOL,sell,risk=VOLUME

Buy with SL/TP

LicenseID,SYMBOL,buy,risk=VOLUME,sl=PIPS,tp=PIPS

Sell with SL/TP

LicenseID,SYMBOL,sell,risk=VOLUME,sl=PIPS,tp=PIPS

Buy Stop

LicenseID,SYMBOL,buystop,risk=VOLUME,pending=PIPS

Buy Limit

LicenseID,SYMBOL,buylimit,risk=VOLUME,pending=PIPS

Sell Stop

LicenseID,SYMBOL,sellstop,risk=VOLUME,pending=PIPS

Sell Limit

LicenseID,SYMBOL,selllimit,risk=VOLUME,pending=PIPS

Close Buy Positions

LicenseID,SYMBOL,closebuy

Close Sell Positions

LicenseID,SYMBOL,closesell

Close All Positions

LicenseID,SYMBOL,closeall

Close All with Comment

LicenseID,SYMBOL,closeall,comment=STRATEGY

Close Long Then Buy

LicenseID,SYMBOL,closelongbuy,risk=VOLUME,sl=PIPS,tp=PIPS,comment=STRATEGY

Close Long Then Sell

LicenseID,SYMBOL,closelongsell,risk=VOLUME,sl=PIPS,tp=PIPS,comment=STRATEGY

Close Short Then Buy

LicenseID,SYMBOL,closeshortbuy,risk=VOLUME,sl=PIPS,tp=PIPS,comment=STRATEGY

Close Short Then Sell

LicenseID,SYMBOL,closeshortsell,risk=VOLUME,sl=PIPS,tp=PIPS,comment=STRATEGY

Buy with Trailing Stop

LicenseID,SYMBOL,buy,risk=VOLUME,trtrig=PIPS,trdist=PIPS,trstep=PIPS

Sell with Trailing Stop

LicenseID,SYMBOL,sell,risk=VOLUME,trtrig=PIPS,trdist=PIPS,trstep=PIPS

Buy with Breakeven

LicenseID,SYMBOL,buy,risk=VOLUME,betrig=PIPS,bedist=PIPS

Sell with Breakeven

LicenseID,SYMBOL,sell,risk=VOLUME,betrig=PIPS,bedist=PIPS

Cancel Pending Buy Orders

LicenseID,SYMBOL,cancellong

Cancel Pending Sell Orders

LicenseID,SYMBOL,cancelshort

Pyramid Trading

LicenseID,SYMBOL,buy,risk=VOLUME,py

Recovery Mode

LicenseID,SYMBOL,buy,risk=VOLUME,re

Percentage Risk

LicenseID,SYMBOL,buy,risk=PERCENTAGE

With Comment

LicenseID,SYMBOL,buy,risk=VOLUME,comment=STRATEGY

Tip
Pro Tip: Use these formats as templates for your TradingView alerts or webhook configurations. Replace the placeholder values (LicenseID, SYMBOL, VOLUME, PIPS, etc.) with your actual values.

Need Additional Help?

Our support team is ready to assist you with any questions you might have.

Email Support