Back

Oanda Order Execution Fails

Greetings!

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',
  'reason': 'STOP_LOSS_ON_FILL_GUARANTEED_REQUIRED',
  '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

Update Backtest








0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Same issue here :-( 

0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed

 
";