Attachments forums

Re: 👨‍🔬 Cagliostro's MT5 Laboratory

Cagliostro, Wed Mar 18, 2026 3:34 am

ADAPTIVE KALMAN FILTER


Origin: post1295580938.html#p1295580938

An interesting story - I was in the middle of a huge testing of all the best trend indicator codes I know, when @SonOfTheLivermore shared this persistent version of the Kalman Trend by Zeiierman, a well known pinescript coder. Unusual code, with some strange (weird) math that I've found while converting it.

I respected the original code without "fixing" it and put in on a chart to check if visually the conversion was aligned with the original TV script. It was ok so shared it, but it looked good, too good on chart, so added it to the list of the tested indicators.

The test ended few hours ago.

Contestants:
• McGinley ATR Band (proprietary)
• SuperTrend
• Kalman Trend
• ATR Stepped PDFMA
• Meridian Trend (proprietary)
• Meridian F3 (proprietary)
• HA Smoothed
• Parabolic Sar
• Half Trend
• SSL Channel
• Magic Trend
• Adaptive Kalman Filter (this guy)

Methodology
• OOS walk-forward: 5 folds, 10% embargo between IS/OOS splits
• Data: Tickstory M1 bars, 2021–2026, 96.6M rows across 66 symbols (proprietary synthetic library)
• Delta = average improvement of filtered vs unfiltered direction across 5/10/20/40 bar horizons
• All indicators tested with default/recommended parameters — no curve-fitting
• Universe: 28 FX pairs, 12 indices, 4 metals, 3 energy, 2 crypto, 10 equities
• Asset class buckets use natural timeframes: FX on M5/M15, Indices/Metals/Equities on H1

Goals
• Validate Meridian Trend as the best universal trend indicator core
• Find the best trend indicator per asset (without curve fitting)

Results:
• The two meridian engines resulted the best overall trend indicators (so, finally we've got a new trend engine backed by strong math and testing).
• Surprisingly we have this Adaptive Kalman Filter (Zeiierman Kalman) scoring an excellent third place with absolute dominance over the crypto space on any TF. It looked good, did not realize so good.
• Below you can find a summary picture with the most relevant results.
All files in topic