Back

Support and Resistance levels

Hi everyone,

I'm new and just starting out with QC algorithms. I was wondering if there are any sample algorithms (or a built in utility class) that can identify support and resistance levels given a set of bars.

Thanks in advance,

Buddhika

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 Buddhika ! Great that you're exploring the platform. LEAN code is open source, in Github, you can run it locally from visual studio.

Lots of sample Alogorithms in the "Algorithms" folder:
https://github.com/QuantConnect/Lean/tree/master/Algorithm.CSharp
 

0

Hi Buddhika,

QCU do not have examples nor a build-in class for support/resistance.
You can ask for a future implementation at Lean in Github.

Hopefully a community member has implemented it and will share.

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.


Thanks for the replies Alexandre and Marco. I'm surprised it hasnt been implemented yet. I will request for a future implementation.

In the meantime I will try to write my own implementation since my day trading strategy relies heavily on identifying support and resistance which I would like to automate since I wont be able to watch the trades during the day. I'm a java programmer so there is a small learning curve with C#. I will share what I come up with the community.

0

Lol Sharpe ratio 10
0

Hey Buddhika,

I have a suggestion on how one might find supports and resistances.

We can find the local maxima/minima over a fixed look back period like 50 bars. We can identify these maxima/minima by finding the points which are either locally at the top of a "hill" or locally at the bottom of a "trough".

You can then list all these extrema points. If 2 or more of these points are within some price factor like 1%, we've found a price level.

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 @Rahul Chowdhury, if you dont mind., could you share the same Algo in C#?

1

Hey Saravana,

Here is the same algorithm in C#. I restructured the algorithm a bit to accomodate it to C#.

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.


Rahul Chowdhury Thanks a lot

0

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