I am looking for information about Supertrend calculation implementation in Python. Some tools have a build in Supertrend indicator that changes color to indicate the trend direction. I came across this implementation of Supertrend calculation: https://github.com/techietrader/Trading-indicators-and-Chart-patterns/blob/master/Indicators/Super_Trend.py
It produces a line that follows a closing value very closely but there is nothing in this code that clearly indicates which values on the calculated line fall into the UP trend and which values fall into the the DOWN trend categories.
In the above implementation, is it correct to assume that the values that are copied into df['Supertrend'] from df['Supertrend_lower_band'] are the down-trend values and the values that are copied into the df['Supertrend'] from df['Supertrend_upper_band'] are the up-trend values ?
Submitted September 28, 2020 at 08:46PM by WellDoneCode