trophy

Long Only, ETF Alpha Streams Competition with $27,500 Prize Pool

Back

Algo doesnt see manually closed orders.

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.

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.


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.

0

Hi Luca,

Unfortunately, we don't support manual intervention and Take Profit orders aren't explicitly implemented in LEAN.

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.


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?

0

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.

1

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.


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