This performs the described 2 to 5 bar oscillator on the input table. Tables require version 2013b or later, but the code can be easily modified to take a matrix OHLC series. This also required coming up with a function to simulate percentrank in Excel, as specified. Minor tweaks to this function should be unnecessary but can be incorporated as desired. Weightings other than default (1 : 1 for high : low) can be obtained from Varadi's website.
Matthaeus (2022). Varadi Oscillator (DVO) (https://www.mathworks.com/matlabcentral/fileexchange/56947-varadi-oscillator-dvo), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!