Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
How to detect previous highs and lows automatically?

Hi, I would like to set a retracement of a trend.
say, A is previous high, B is the previous low, is it possible to design a code that allows auto-detect the price difference A & B?