I am just trying to learn QuantConnect. I have created a very basic algorithm and tried to deploy on Oanda demo account.

However I am unable to create any order. The order status for all the orders is "invalid"

I have personally checked the order details locally using Oanda API.

Here is a failed order transaction

{'transaction': {'type': 'ORDER_CANCEL',
  'orderID': '186',
  'id': '187',
  'accountID': '#
  'userID' : #
  'batchID': '186',
  'requestID': '42519692668999648',
  'time': '2019-01-15T11:01:57.016281613Z'},
 'lastTransactionID': '187'}

Apparently, the order is failed because "Guranteed Stop Loss" is required.

Also via OANDA api, I used to set guranteed stop loss and take profit, together in one single order.

How can I rectify the error? Also, Is it possible to add stop loss and take profit together in one single order? Could you please share a code snippet for the same?

Many Thanks