I am trying to get the local minimum and local maximum prices into a pandas data frame. This data frame has other data as well such as the opening, high, low and closing prices, a number of exponential moving averages that I have calculated etc.
To this end, I need a few clarifications.
In terms of data, I have daily price data for a year.
Do the minimaIdxs and maximaIdxs parameters contain indices to each local minimum and maximum price? I am using them as row indices to get to the respective row in the data frame and add the relevant price in its own column.
I want to use Fibonacci Retracement. The local minima and local maxima are perfect for this but the problem I have is that since the number of local maxima and number of local minima are not the same, I am having a hard time finding which is the maximum price and which is the minimum price.
Its possible that I have misunderstood the parameters that calc_support_resistance takes therefore feel free to set me strait.
Hi all,
I am trying to get the local minimum and local maximum prices into a pandas data frame. This data frame has other data as well such as the opening, high, low and closing prices, a number of exponential moving averages that I have calculated etc. To this end, I need a few clarifications. In terms of data, I have daily price data for a year.
Its possible that I have misunderstood the parameters that calc_support_resistance takes therefore feel free to set me strait.
My code is below.
def calculate_support_resistance(df): minvals, maxvals = trendln.calc_support_resistance(df['close'],accuracy=2)