create_order: Create a new order

Description Usage Arguments

Description

Create a new order See the following link for further information: http://developer.oanda.com/rest-live/orders/#createNewOrder

Usage

1
2
3
4
create_order(oanda, instrument, units, side, type, expiry = NULL,
  price = NULL, lower_bound = NULL, upper_bound = NULL,
  stop_loss = NULL, take_profit = NULL, trailing_stop = NULL,
  accound_id = NULL)

Arguments

instrument

Instrument to open the order on.

units

The number of units to open order for.

side

Direction of the order, either 'buy' or 'sell'.

type

The type of the order 'limit', 'stop', 'marketIfTouched' or 'market'.

expiry

If order type is 'limit', 'stop', or 'marketIfTouched'. The order expiration time in UTC. The value specified must be in a valid datetime format.

price

If order type is 'limit', 'stop', or 'marketIfTouched'. The price where the order is set to trigger at.

lower_bound

The minimum execution price.

upper_bound

The maximum execution price.

stop_loss

The stop loss price.

take_profit

The take profit price.

trailing_stop

The trailing stop distance in pips, up to one decimal place.


teramonagi/oandar documentation built on May 8, 2019, 8:51 a.m.