Hello everyone,
I decided to start this topic as Iāve been experimenting with native machine learning (ML) logic within a few custom indicators, and I figured it might be valuable for others as well.
While learning MQL4 coding, I ran into several limitationsāespecially when it came to building smarter, more dynamic tools. That led me to switch to MQL5, which offers far more flexibility, especially for handling ML-style logic natively within the indicator itself.
Some of you may have seen my earlier attempt to create a more āintelligentā version of the SuperTrend indicator in MQ4. Although it worked to some extent, it hit a ceiling quickly. So, I fully converted it to MQ5 and started adding useful enhancements.
Rather than using traditional ML systems like MALE5 (which typically require offline training and external models), I wanted to explore lightweight, native, and live ML approachesāones that adapt in real-time without complex training pipelines.
So I took SuperTrend again as a base and started layering in:
⢠Live ML scoring based on price behavior
⢠Adaptive logic using recent candle structures and volatility
⢠Noise filtering and pattern-snap logic to reduce fakeouts
My goal is to evolve a version that feels āsmart out of the box,ā without sacrificing performance or stability.
So hereās my first attempt, based on a SuperTrend by none other than mladen:
SuperTrend ML Adaptive ā Smart Trend Detection with live Market Learning
SuperTrend ML Adaptive is a custom indicator that enhances the classic SuperTrend (CCI-based) logic with live, native machine learning-inspired intelligence ā all running directly inside MT5, with zero external models or training.
āø»
ML-Inspired Candle Scoring
Each candle is scored in real-time using body size, wick ratio, volatility (ATR), and CCI strength. The result: a dynamic MLScore per candle, reflecting how āstrongā or āsignificantā a move really is.
Adaptive ATR Sensitivity
Instead of using a fixed ATR value, the indicator adapts its volatility buffer using recent candle behavior. This means:
⢠Strong trends trigger faster trend switches
⢠Weak/noisy moves are filtered out
⢠The SuperTrend line becomes more intelligent and stable
Noise & Pattern Filtering
With optional filters:
⢠Suppresses trend flips caused by minor candle noise
⢠Snaps breakout logic to only allow trend changes when candles show clear strength[/color]
āø»
Inputs Overview
⢠Enable or disable adaptive logic
⢠Candles to study (default = 5 to study and give the last nr of candles extra weight for current decision)
⢠Filter micro movements (noise filter)
⢠Detect breakout pattern (a check to determine if a breakout could be false or not)[/color]
āø»
No Repainting, No Recalculation, No Hype. All calculations are native, live, and stable. Thereās no repainting, no machine learning training phase, and no external dependencies. Itās smart by design ā not by buzzwords. Please test this version with caution. If you notice some flaws or errors, please let me know. Enjoy!
PS in the picture you see 2 instances of the indicator. One with all smart things turned on (candles) and one with the standard SuperTrend settings as is (lines).
Native ML (Machine Learning) indicator(s)
1- These users thanked the author Pipa for the post (total 19):
- FrĆøst, eduarescobar, Jimmy, mrtools, budhi1976, Ogee, kvak, thomdel, AlgoAlex811, k_khan_bt, ZigZag, Akela, Abdi, rudiarius, SdW25, numega, forexjoe85, alexm, LittleCaro
- Rating: 11.2%