Whenever John Ehlers writes about a new indicator, I crack it open and wire it straight into C for the Zorro platform. Or rather, I let ChatGPT do most of the work. The One Euro Filter is a minimalistic, yet surprisingly effective low-latency smoother that reacts instantly to volatility with less lag of the usual adaptive averages. This is achieved by dynamically adapting its time period.
This is the OneEurFilter function in C, converted straight from Ehlers’ EasyLanguage code, the comments left in place:
var OneEurFilter(vars Data, int PeriodMin, var Factor)
{
vars SmoothedDX = series(Data[0],2),
Smoothed = series(Data[0],2);
var Alpha = 2*PI/(4*PI + 10);
//EMA the Delta Price
SmoothedDX[0] = Alpha*(Data[0]-Data[1]) + (1.-Alpha)*SmoothedDX[1];
//Adjust cutoff period based on a fraction of the rate of change
var Cutoff = PeriodMin + Factor*abs(SmoothedDX[0]);
//Compute adaptive alpha
Alpha = 2*PI/(4*PI + Cutoff);
//Adaptive smoothing
return Smoothed[0] = Alpha*Data[0] + (1.-Alpha)*Smoothed[1];
}
This is how the OneEurFilter (blue line) looks when applied on a ES chart:

The price curve is well reproduced with almost no lag. Cheap, efficient, low-latency — 1 Euro well spent. The code can be downloaded from the 2026 script repository.
It may be worth mentioning the originators of this filter are at https://gery.casiez.net/1euro/ where many different language implementations reside.
Thanks for the info! I got the code from Ehler’s TASC article.
appreciated
fraction of the rate of change doesn’t have an effect on cutoff period
“`
#include // copy pasta from article
DLLFUNC void run()
{
StartDate = 20260101;
LookBack = 500;
vars p = series(price(0));
var x = OneEurFilter(p,100, .2); // <— notice Factor argument
var y = OneEurFilter(p,100, .4);
var z = OneEurFilter(p,100, .6);
plot("x",x,LINE,BLACK);
plot("y",y,LINE,GREEN);
plot("z",z,LINE,BLUE);
}
“`
all 3 graphed lines look identical
issue was – rate of change was deep down in decimals for selected instrument
with Factor values [200000, 400000, 600000] difference becomes visible
(guess the instrument)
which leads me thinking – it’s a really bad parameter design
responsiveness is tightly coupled with how many digits signal value has
I guess the indicator was intended for futures with daily bars, as almost all indicators by Ehlers. For Forex or other assets with very small differences, or for shorter bar periods, you must use an accordingly higher Factor.
You could experiment with a modification, for using really the rate of change instead of just a difference.