Buy/Sell Message Syntax

Basic Rules

  • Use Key=Value to set up instructions. Multiple keys can be separated by commas (,).
  • Spacing around keys, values, or between multiple keys is not important.
  • Keys are case-insensitive - upper or lower case does not matter.
  • The order of Key=Value pairs is not important. You can arrange them in any order.
  • Each action requires mandatory keys to be considered valid.
  • Optional keys can be included to provide additional settings or data.
  • Keys that are not supported by the action will be ignored.
  • Maximum message length is 512 characters.

Supported Keys

KeyValuesExampleDescription
action*Buy, Sellaction=Buy; action=SellBuy/Sell action
symbol*textsymbol=GBPUSDTrade symbol
size*Volume, % Account, Amountsize=1; size=0.5%; size=1000$Size of trade
pricenumber, Marketprice=1.234; price=marketPrice to trade
slPrice, Point Change, % Changesize=1.234; size=10; size=0.5%Stop loss level
tpPrice, Point Change, % Changesize=1.567; size=20; size=1%Take profit level
breakparam numbersbreak=20:10Breakeven setup
trailparam numberstrail=30:20:10; trail=0:H1:14:1:0Pip or ATR Trailing stop setup
commenttextcomment=ByPipSenderTrade comment

Keys that marked with * are mandatory keys. Missing any of mandatory keys will make the message invalid


Explanation


action

Use this key to define the trade action you want to perform. This is mandatory key.

  • Use action=Buy to place a Buy order
  • Use action=Sell to place a Sell order

symbol

Use this key to specify the asset you want to trade. This is mandatory key.

Our symbol-mapping feature helps you in these cases:

  • Case-insensitive symbols: If your broker requires uppercase symbols, and you send symbol=eurusd, it will be converted to EURUSD automatically.

  • Symbols with prefixes or suffixes: If your broker uses prefixes or suffixes, you can configure them in the Pip Receiver by using Symbol Prefix and Symbol Suffix inputs.
    Example:
    You send โ†’ symbol=EURUSD
    Broker symbol โ†’ iEURUSDm
    We will map it automatically based on your setup.


size

Use this key to define the Buy/Sell size. This is mandatory key. You can specify size in three units

1. Fixed lot size

Use a number without sign suffix to set fixed lot size.

Message:
action=Buy, symbol=EURUSD, price=1.2, size=0.1

Result:
Buy 0.1 lots of EURUSD.

2. Percentage of Account Balance

Use a number with percent sign (%) suffix to use lot size calculated from your current account balance.

Message:
action=Buy, symbol=EURUSD, price=1.2, size=0.5%

Calculation:  
 - Accoun balance = $10,000; Leverage = 100:1
 - Trade size = 0.5% of Free Margin โ†’ $10,000 ร— 0.5% = $50
 - Apply leverage: $50 ร— 100 = $5,000 position size
 - Convert to lots: $5,000 รท 1.2 = 4,166.67 units = 0.04 standard lots (rounding applied)  

Result:
Buy 0.04 lots of EURUSD.

3. Amount of Account Currency

You can specify a fixed currency amount for the trade size by adding a dollar sign ($) suffix.
Notes:

  • The dollar sign is used as a symbol, but the actual currency is based on your account's currency.
  • The amount is before leverage. Your account leverage will be applied.
Message:
action=Sell, symbol=USDCAD, price=1.4, size=100$

Calculation:  
 - Account currency = CAD; Leverage = 100:1
 - Trade size = CA$100
 - Apply leverage: CA$100 ร— 100 = CA$10,000 position size
 - Convert to lots: CA$10,000 = 10,000 units = 0.1 standard lots (rounding applied)

Result:
Buy 0.1 lots of USDCAD.  

price

Use this key to define the entry price.

If no price is specific, market order is placed. You don't need to specify the order type. It's automatically determined based on the price.

  • Market execution:
    Use price=Market, price=0 or just not use the price key.

  • Pending orders:
    If the price is above the current market price โ†’ a Buy Stop or Sell Limit is placed
    If the price is below the current market price โ†’ a Buy Limit or Sell Stop is placed


sl

Use this key to set Stop Loss level of the trade. You can specify stop loss level in three units:

1. Fixed price Stop loss:

Use a number without suffix to set fixed price Stop loss.

Message:
action=Buy, symbol=EURUSD, price=1.23456, size=1, sl=1.23

Result:
Stop loss level is price = 1.23000

2. Change in Points Stop loss:

Use a number with P suffix to use Change in Points stop loss.

We use point, not pip. Point is the smallest price change of symbol, depend on the symbol and broker.

  • For EURUSD symbol with 5-digit brokers, 1 point = 0.00001. With 4-digit brokers, 1 point = 0.0001.
  • For EURJPY symbol with 3-digit brokers, 1 point = 0.001. With 2-digit brokers, 1 point = 0.01.
Message:
action=Buy, symbol=EURUSD, price=1.23456, size=1, sl=300P

Calculation:  
 - Point value = 0.00001 (minimum price change, based on broker and symbol);
 - 300P = 300 Points
 - Subtract fom entry price: 1.23456 - 300 points = 1.23156

Result:
Stop loss level is price = 1.23156  

3. Change in Percentage Stop loss:

Use a number with percent sign suffix to use Change in Percentage stop loss.

Message:
action=Sell, symbol=EURUSD, price=1.23456, size=1, sl=0.5%

Calculation:  
 - 0.5% of entry price = 1.23456 รท 100 ร— 0.5 = 0.00617 (rounding applied)
 - Adding to entry price (Sell order): 1.23456 + 0.00617 = 1.24073

Result:
Stop loss level is price = 1.24073

tp

Use this key to set Take Profit level of the trade. The way it works is as same as Stop loss level.


break

Use this key to set up breakeven for the order. Specify the breakeven setup as Start:Offset

  • Start: The trigger level, measured from the entry price, that activates the Breakeven. It must be > 0 and > Offset
  • Offset: The price offset, calculated from the entry price, to which the stop loss is adjusted. Must be >= 0

Important Notes

  • The order of the parameters matters.
  • Both Breakeven Start and Breakeven Offset are measured in Points (the smallest price change of symbol) away from the entry price.
  • If the existing stop-loss level provides a more favorable profit, it will remain unchanged.
  • The breakeven logic is fully managed by the Pip Receiver. So keep it running on your MetaTrader terminal is required.
Message:
action=Buy, symbol=EURUSD, price=1.23456, size=1, break=20:10

Result:
- Long position opened at 1.23456 (entry price)  
- Price reaches 1.23476 (Start = 20) โ†’ stop loss moves to 1.23466 (Offset = 10)

trail

Use this key to enable Pip or ATR trailing stops.


Pip Trailing Stop:

Specify the Pip trailing stop setup as Start:Distance:Step

  • Start: The trigger level, measured from the entry price, that activates the trailing stop. Must be >= 0
  • Distance: The gap maintained between the current price and the stop-loss level. Must be > 0
  • Step: The minimum price movement in your favor required before each new stop-loss adjustment. Must be > 0
Message:
action=Buy, symbol=EURUSD, price=1.23456, size=1, trail=30:20:10

Result:
- Long position opened at 1.23456 (entry price) 
- Price reaches 1.23486 (Start = 30) โ†’ stop loss moves to 1.23466 (Distance = 20)
- Price reaches 1.23496 (Step = 10) โ†’ stop loss moves to 1.23476 (Distance = 20)
- And so on...

Important Notes

  • The order of the parameters matters.
  • All Start, Distance and Step are measured in Points (the smallest price change of symbol).
  • The trailing stop logic is fully managed by the Pip Receiver. So keep it running on your MetaTrader terminal is required.

ATR Trailing Stop:

Specify the ATR trailing stop setup as Start:Timeframe:Period:Multiplier:Shift

  • Start: The trigger level, measured from the entry price, that activates the trailing stop. Measured in points (the smallest price change of symbol) and must be >= 0
  • Timeframe: The timeframe used to calculate the ATR value.
  • Period: The number of periods used in the ATR calculation. Must be > 0
  • Multiplier: The ATR multiplier used to determine the trailing stop distance. Must be > 0
  • Shift: The candle offset used for ATR calculation; 0 refers to the current candle. Must be >= 0
Message:
action=Buy, symbol=EURUSD, price=1.23456, size=1, trail=10:H1:14:1:0

Result:
- Assume that ATR value at the current candle (Offset = 0) is 0.001. The ATR value is calculated with Timeframe = H1, Period = 14 and Multiplier = 1 as settings
- Long position opened at 1.23456 (entry price). 
- Price reaches 1.23466 (Start = 10) โ†’ stop loss moves to 1.23366 (ATR = 0.001)
- Price reaches 1.23467 โ†’ stop loss moves to 1.23367
- And so on...

Important Notes

  • The order of the parameters matters.
  • ATR is an absolute value and updates continuously as market prices change.
  • MT4 supported timeframes : M1, M5, M15, M30, H1, H4, D1, W1, MN1
  • MT5 supported timeframes: M1, M2, M3, M4, M5, M6, M10, M12, M15, M20, M30, H1, H2, H3, H4, H6, H8, H12, D1, W1, MN1
  • The trailing stop logic is fully managed by the Pip Receiver. So keep it running on your MetaTrader terminal is required.

comment

Use this key to set order comment.

Notes:

  • No spaces or special characters allowed
  • Maximum 31 characters
action=Sell, symbol=EURUSD, price=1.23456, size=1, comment=ByPipSender