Nano Course On Python For Trading
==========================
Module 3
In this post, I will attempt to teach you how to write an algorithm in python to automatically find support and resistance. We shall use the data we downloaded in module 2.
+
To visualize price action, I have used the daily candlestick chart. To quantify the meaning of support and resistance, I have taken below definitions:
In a series of 5 continuous candles, if the first three candles make increasing high and then 2 decreasing highs, then the
+
high of the third candle is considered resistance. Similarly, if the first 3 candles make lower lows and the next 2 make high lows then the low of the third candle is support.
+
The above explanation is for the sake of quantifying support and resistance at a very basic level. These are called fractals. Now let's get started with the code.
mpl_finance is the new module here. We will use its candlestick_ohlc function.
+
Now, if you remember, you downloaded data for nifty 50 stocks in module 2. We shall use that data. Let's work on ITC data this time.
We will use data from 1 Jan 2021 to 30 June 2021.
+