LEAN is the open source
algorithmic trading engine powering QuantConnect. Founded in 2013 LEAN has been built by a
global community of 80+ engineers and powers more than a dozen hedge funds today.
Alpha League Competition: $1,000 Weekly Prize Pool
Qualifying Alpha Streams Reentered Weekly Learn
more
I can view trade log, but only has half a dozen fields.
I'd like to see;
date/time order created + date/time order filled
fill price, fill-time
exit time, exit price + exit tag (I can only see entry tag)
I've been trying to find Python documetation on this.. I found some C# code, using smething like 'resultsBacktestObject' but having difficulty figuring out how to do in Python. Please could anyone give an example?
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.
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.
Pro
,
Hi guys, does anyone know how to find this info, or a good Python link to it? Thank-you
0
Alexandre Catarino
Pro
,
We can get the information on closed trades from the TraderBuilder object:
Your quick reply is greatly appreciated. I've been playing with this but not able to get OnEndOfAlgorithm to be called.. at least the Log isn't displaying anything. Will experiment with code more and try and fix. Thanks for pointer
0
Pro
,
Hi Alex, Unfortuantely I've tried several differnt examples and OnEndOfAlgorithm is not getting called. I see no Log output anyway. I tried adding not just to my code but included in QC Python moving average code, and still it doesn't get called. Anything I'm doing wrong? Thanks
0
Alexandre Catarino
Pro
,
Please checkout the working example:
1
Pro
,
Hi Alex, again thank-you for your dedication in repling to my queries.
I was surprised to see your code worked and couldn't understand why mine didn't.
Infact I still don't understand why my code doesn't do what's expacted. All I did was link your MA crossover code with the OnEndOfAlgorithm code about.. nothing shows in log. Is there something I have missed? Thanks
My code attached
0
Alexandre Catarino
Pro
,
There is an indentation bug in your code: a extra indent across the whole OnEndOfAlgorithm method.
0
Pro
,
opps. Great thank-you, tested it and it works fine now. Appreciated
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...
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!