I'm testing an algo live with tiny sums of money. QC wont let me do proper TAKE_PROFIT orders, so I'm closing my trades by setting manual takeprofits from my brokers app.
So, I had 25 open units (opened by the algo). I manually set takeprofits on 8 (from my brokers app). These 8 hit takeprofit and were successfully closed. But my algo still thinks i have 25 units open, when i obvioiusly only have 17 open on the broker servers.
Also, the Algo sees that my cash has changed to reflect the gains from these 8 closed units, but the fact the 8 units were closed is not seen from the algo and neither that the average position price has changed.
I'm wondering, what data can be asked, retrieved, and refreshed, directly from the broker servers?
Thanks for any pointers.
Michael Manus
Its an automated trading platform with quantitative rules you can set. That is how i understand QC.
I think that was not the design to interact with the user.
Jack Simonson
Hi Luca,
Unfortunately, we don't support manual intervention and Take Profit orders aren't explicitly implemented in LEAN.
Luca Napo
Thanks for your answers.
But it does see the change in cash, why does it see the change in cash but not the other changes?
What data can be asked directly from the brokers servers?
Jack Simonson
Hi Luca,
We can only display data from the brokerage that has a LEAN equivalent, i.e. portfolio cash, securities/shares, etc. We advise against trading manually using a third party software (i.e., a brokerage's app or terminal) in an account that is being used by Lean/QuantConnect. LEAN only loads positions and account balance when it is initialized, and so placing trades via another app will not reflect in the algorithm. However, users can manually place orders (and add securities to the algorithm) using QuantConnect IDE.
Luca Napo
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!