trendln
trendln copied to clipboard
Support/Resistance lag
Hello @GregoryMorse , Thank you for the great work.
After several months of playing and using the library, I found that when calculating support and resistance, most of the times it doesn't calculate the last day/minute points. Let say that I'm using daily data and calculating support and resistance on the high/low. Let's also say that last day is having long tail. When calculating S/R, it doesn't show that as a support. However, when we have a new data for the next day, the library shows the long tail as a support point as seen below:


Can you explain why is this happening? also, is there a way to fix this?
Thank you again for this great library.
I saw your email and I am responding. After thinking about it, yes you are right this is a problem. Because to be a "maxima" or "minima" it is assumed that the peaks and troughs are occurring in the middle. However, I realize this is a very legitimate practical problem and should be fixed. Its not the trend line functions, but the get_extrema like functions causing the issue. An option should be added for this. Likely its only needs at the tail of the data, not the beginning of it but why not give both options. This is a great point and thanks for the request, it will be added.
Thank you for your reply. I can't wait for that addition
any updates regarding this? This looks like a rather promising project!
Perhaps you could do some forecasting to pad the end with the expected price movements after which get_extrema should be able to locate a min/max point