Is it possible to set entries/stops based on the Value Area or specific percentiles?

Back

Dear community,

I'm currently developing a strategy where it is crucial to set entries & stops based on the volume profile.

I have read this article which shows how to get the volume profile for a particular day (

https://www.quantconnect.com/forum/discussion/7716/working-out-value-area-a-k-a-market-profile-volume-profile-from-auction-market-theory/p1

).

 

I want to set entires/stops based on the previous x days of the accumulated volume.

For example:

As soon as price is outside of the 2nd standard deviation (based on volume) of the last ten days buy/sell a security.

If I placed an order I want to set stops based on percentiles, for instance as soon as price hits the 10% or 90% percentile (based on volume) liquidate the position.

 

I am trying to understand how to modify the code (Derek Melchin's code from the post) so it incorporates the functionality I need.

 

I hope that you can point me into the right direction.

 

Thank you very much

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.


Hi Mar17,

To get specific volume points over the past days,  we would instead need to store the volume in a RollingWindow.

Best,
Shile Wen

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...

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!