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
Daniel Montero Motilla
Same issue here :-(Â
Jack Simonson
Hi All,
Are you paper-trading on your Oanda Demo account locally in LEAN or in the IDE? I've run the code you provided with my own DEMO account and wasn't able to replicate the error, so any specific information you can provide about deploying the algorithm will be helpful. As far as combining orders, you can place a stop loss and calculate a take-profit order, but we don't support take-profit as an individual order type (you can calculate the profit-target price of the security and place a stop-market or stop-limit order to mimic the behavior). You can see more information and examples from the community here.
Piby 180
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!