I recently discovered how to implement a zero lag filter and wanted to share it here.
Use your favorite IIR (recursive) filter and use in a bidirectional (aka forward-backward) method.
https://www.dspguide.com/ch19/4.htm
This works by forward filtering price using the recursive feature of an IIR filter, and then filtering the forward data in reverse via reverse recursion. This is the filtfilt function in MatLab.