I've don't have a background in data science and I've been reading Perry Kaufman's Trading Systems and Methods and I'm trying to filter out some of the trades that are happening during more noisy times in the market, e.g. when prices is chopping around a lot as my strategies work best during trends. He mentions a few functions, efficiency ratio, fractal dimension and price density and X. But I'm struggling to find this function in any python libraries. Could someone point me in the right direction?

ThanksĀ