Supported commands

Open market order

Syntax FXTS2 MT4 MT5

Symbol

Required
symbol=your_symbol

Order side

Required
side=buy
side=sell
side=long
side=short
side=B
side=S

Rate/price. The current price will be used if not specified

Optional
rate=number
rate=numberpips

Order type

Optional
order-type=market
order-type=stop
*Requires rate
order-type=limit
*Requires rate

Position size

Required
quantity=number
In lots
quantity=number%
In % of equity
quantity=number%r
In risk % of equity. Requires stop-loss

Action

Optional
action=create

Stop loss

Optional
stop-loss=number
In price
stop-loss=numberpip
In pips

Take profit

Optional
take-profit=number
In price
take-profit=numberpip
In pips

Order id

Optional
order-id=id
Can be used for changing stop loss/take profit/order or closing/deleting the trade/order

Breakeven

Optional

Trailing

Optional

Lifetime in seconds

Optional
lifetime=60

Examples:

Buy 0.01 lots of EUR/USD at market

symbol=EURUSD side=buy quantity=0.01

Sell EUR/USD at market using 5% of equity

symbol=EUR/USD side=short quantity=5% action=create
order-id=12345 action=create symbol=eurusd quantity=1 side=long

Breakeven feature

Moves/sets the stop to the specifed level when the profit hits the specified amount.

Syntax FXTS2 MT4 MT5

When

Required
breakeven-when=numberpips

To

Optional
breakeven-to=numberpips

Example

breakeven-when=10pips breakeven-to=5pips // move stop to +5 pips profit after 10 pips of profit is reached
breakeven-when=10pips // move stop to 0 pips profit (breakeven point) after 10 pips of profit is reached

Trailing

Trail the stop each n pips of price movement in the favor direction.

Syntax FXTS2 MT4 MT5

When

Optional
trailing-when=numberpips

Step

Required
trailing-step=numberpips

Examples

trailing-when=10pip trailing-step=1pip // move price in 1 pip steps after 10 pips profit is reached
trailing-step=0.5pip // move price in 0.5 pip steps

Changing of market order

Syntax FXTS2 MT4 MT5

Action

Required
action=change

Stop loss

Optional
stop-loss=number
In price
stop-loss=numberpip
In pips

**Take profit **

Optional
take-profit=number
In price
take-profit=numberpip
In pips

Order id

Required
order-id=id

Examples

order-id=12345 action=change stop-loss=20pip // Set stop of order 12345 to 20 pips from it's open price

Closing a position

Syntax FXTS2 MT4 MT5

Symbol

Optional
symbol=your_symbol

Order side

Optional
side=buy
side=sell
side=long
side=short
side=B
side=S

Position size in lots

Optional
quantity=number

Action

Required
action=close

Order id

Optional
order-id=id

Example:

symbol=EURUSD action=close quantity=1 (close 1 lot for EURUSD)
symbol=EURUSD action=close (close all positions for EURUSD)
symbol=EURUSD action=close side=long (close all long positions for EURUSD)
order-id=12345 action=close (close single position)