A trading range is determined by price, volume, and time. To accurately represent support and resistance levels, price movements should be weighted by volume. The duration of the trading period is important. If a stock is consistently in a downtrend over a 30-day period, then a trading range doesn't exist. Therefore, the program should dynamically select the appropriate time period for identifying trading ranges. It should also be capable of identifying support and resistance levels even beyond the specified time period, as historical data points may indicate these levels.
This should be done using only OHLC (Open, high, low, close) daily stock quotes with volume data since these are the only ones available to us.
Been thinking about this problem and i'm not sure how to approach the issue for the best support/resistance values. Thought about pivot points, donchian channels, moving averages, VWAP, and etc. But I don't know the best for daily quote data and currently thinking how to make it dynamic. It has to automatically find the right trading ranges for all the stocks. Any leads?
Below is an example of such a trading range that I ideally want to form:
Had one using donchian channels
Also had one version where you just get the minimum and maximum values of a range and get the mean of the price. The purple line is the VWAP calculated by Typical price * Volume traded for the day.
I will run my own tests on the data once I come up with something, but currently most of the options I found don't seem to make too much sense to explain as to why a said support/resistance should be around those areas.