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.
Signal Format & EA Settings
The TradeSgnl EA has settings that determine which parameters it uses for trades:
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:
LicenseID - Your unique license identifier (e.g., LicenseID)
SYMBOL - The trading instrument (e.g., EURUSD, BTCUSD)
ACTION - The trading action (buy, sell, buystop, etc.)
VOLUME - Trading size with risk= prefix (e.g., risk=0.01)
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) depending on EA settings
Partial close values can be in lots (pct=2) or percentage (pct=0.5) depending on EA settings
Optional Parameters
Enhance your signals with these optional parameters:
Parameter | Description | Example |
---|---|---|
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 |
pct= | Partial close amount (percentage or lots based on EA setting) | pct=0.5 |
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 |
exop | Exit opposite positions only (no new trade if opposite positions exist) | exop |
exent | Exit opposite positions and enter new trade | exent |
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
Partial Close
Close a percentage of positions instead of the entire position. Use the pct=
parameter with any close action.
LicenseID,EURUSD,closebuy,pct=0.5,comment=Strategy1
Interpretation Control: The EA's "Partial Close Type" setting (in Volume Settings) determines how the pct= value is interpreted - as percentage of position or as exact lots to close
Percentage Mode: Use values between 0.0 and 1.0 (pct=0.5 closes 50% of position volume)
Lots Mode: Use exact lot values (pct=0.5 closes exactly 0.5 lots regardless of position size)
Volume Rounding: Volumes are rounded up to meet broker minimum requirements
Comment Preservation: Remaining positions retain their original comments for future partial closes
Multiple Partial Closes: You can send multiple partial close signals with the same comment
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.
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
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)
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.
Feature Control Settings
Advanced features can be controlled by either signals or EA settings:
Feature | EA Setting | Signal Parameter |
---|---|---|
Trailing Stop | Trailing Mode: Disabled/Enabled/Signal | trtrig, trdist, trstep (requires Signal mode in EA) |
Pyramid Trading | Pyramid Mode: Disabled/Enabled/Signal | py (requires Signal mode in EA) |
Recovery System | Recovery Mode: Disabled/Enabled/Signal | re (requires Signal mode in EA) |
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.
Exit Opposite Positions (ExOp)
Smart position management that closes opposite positions or opens new trades based on market conditions.
LicenseID,EURUSD,buy,risk=0.01,sl=30,tp=50,exop
exop
Flag that modifies trade behavior: If opposite positions exist for the symbol/comment, close them and don't execute the new trade. If no opposite positions exist, execute the trade normally.
How it works:
Buy signal with exop: If sell positions exist → close sells, no buy executed. If no sells exist → execute buy normally.
Sell signal with exop: If buy positions exist → close buys, no sell executed. If no buys exist → execute sell normally.
Trend Reversal: Close counter-trend positions when trend changes, only open new position if market is clean
Risk Management: Avoid adding to drawdown by only trading when there are no opposing positions
Strategy Filtering: Works with comment filtering to manage specific strategy positions only
Exit and Enter (ExEnt)
Advanced position management that closes opposite positions and immediately opens new trades in the signal direction.
LicenseID,EURUSD,buy,risk=0.01,sl=30,tp=50,exent
exent
Flag that modifies trade behavior: If opposite positions exist for the symbol/comment, close them and then execute the new trade. If no opposite positions exist, execute the trade normally.
How it works:
Buy signal with exent: If sell positions exist → close sells, then execute buy. If no sells exist → execute buy normally.
Sell signal with exent: If buy positions exist → close buys, then execute sell. If no buys exist → execute sell normally.
Key Differences from ExOp:
ExOp: Closes opposite positions, then stops (no new trade opened)
ExEnt: Closes opposite positions, then continues to open the new trade
Trend Reversal: Automatically flip from long to short (or vice versa) when market conditions change
Strategy Switching: Close positions from one strategy and immediately enter with a new strategy
Risk Management: Ensure you're always positioned in the current trend direction
Automated Trading: Perfect for algorithmic strategies that need to switch directions quickly
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
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
Buy Order with Comment
LicenseID,EURUSD,buy,risk=0.01,sl=30,tp=50,comment=Strategy1
Buy order with stop-loss, take-profit, and strategy comment
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
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.
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:
Category | Action Types | Description |
---|---|---|
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 (supports partial closes with pct=) |
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:
Action | Format |
---|---|
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 |
Partial Close 50% | LicenseID,SYMBOL,closebuy,pct=0.5,comment=STRATEGY |
Partial Close All 25% | LicenseID,SYMBOL,closeall,pct=0.25 |
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 |
Exit Opposite Positions | LicenseID,SYMBOL,buy,risk=VOLUME,exop |
Exit and Enter | LicenseID,SYMBOL,buy,risk=VOLUME,exent |
Percentage Risk | LicenseID,SYMBOL,buy,risk=PERCENTAGE |
With Comment | LicenseID,SYMBOL,buy,risk=VOLUME,comment=STRATEGY |
Need Additional Help?
Our support team is ready to assist you with any questions you might have.