Re: MT4 Indicator requests and ideas

22301
This AI thing is astonishing (I have not tested the generated files), Using a Claude sonnet 5.5, first having asked Claude to suggest improvements, then:

Please write this up as a v1.3 MQ4 with the fixes, then please create an mql5 port.

I’ve written Adaptive_Breakout_Volume_v1.3.mq4 and an MQL5 port, Adaptive_Breakout_Volume_v1.3_MQL5.mq5. Both are uncompiled and untested, so please compile them and tell me about any errors. The MQL5 port has the same logic and the same changes as the MQ4.

Fixes from the review

Fresh-breakout test: the previous close is now compared with the range of the bars before the previous one (upperPrev/lowerPrev). The test now actually filters, so repeated events in a trend no longer fire. The breakout needs one more bar of history than before (BreakoutLength + 1).
Score plot: both score plots are now histograms, so single bearish bars show up. The Z-score histograms are still in the same pane, which still scales to about ±100 when the score is on, so Z looks small. Turn off ShowScorePane to see Z properly.
Input validation: OnInit rejects AtrLength, BreakoutLength, MemorySessions, MinimumSamples or TrackingBars below 1, session times out of range, and SessionLength outside 1–1440.
Timeframe check: the session start must now fall on the bar grid. The dashboard shows “USE M1-M30” or “SESSION START NOT ON BAR GRID” accordingly.

Performance

DrawBars input: new, default 2000. Arrows, labels and zones are drawn only for the last 2000 bars, and 0 means all history as before. The state machine and baseline still run over the whole history.
Dashboard: values are computed for the last bar only. Comment() is called only when the text changed and at most every 500 ms.
Smaller changes:
The minute of day is calculated by arithmetic.
The true-range array is gone.
ResetState runs once.
The MQL5 port drops the ArraySetAsSeries calls on the input arrays.

Alerts
New inputs AlertPush, AlertEmail and AlertOnInvalid, all off by default. AlertsEnabled is still the master switch.

MQL5 differences

It uses plot and level properties instead of SetIndexStyle/SetLevelValue.
The timeframe is taken from PeriodSeconds()/60.
The “invalidated” arrow is anchored at the top, because MQL5 arrows have no centre anchor.
I dropped IndicatorShortName("")-style behaviour; the name is set to “RV Breakout” as before.

I left out the optional modelling ideas (capping outlier volume, log-volume Z) because they change the results. I can add them as inputs that are off by default if you want.

Please include optional modelling ideas (capping outlier volume, log-volume Z) and add them as inputs that are off by default as versions 1.4

I’ve made v1.4 of the indicator in both MQ4 and MQL5: Adaptive_Breakout_Volume_v1.4.mq4 and Adaptive_Breakout_Volume_v1.4_MQL5.mq5. Both are uncompiled and untested, so please compile them and tell me about any errors. Both new options are off by default, and with them off the results should match v1.3.

Outlier cap (UseOutlierCap, OutlierCapSigma = 3.0): a bar’s volume is capped at the slot mean plus 3 × the dispersion before it updates the baseline. Breakout bars then stop inflating the baseline for the next ones. The cap only applies once a slot has enough samples (MinimumSamples), and it only limits the upper side. The Z-score for the current bar still uses the raw volume.
Log-volume Z (UseLogVolume, LogDispersionFloor = 0.10): the baseline mean, dispersion and Z are calculated on log(volume+1). The dispersion floor can’t be “10% of the mean” in log units, so it becomes the absolute LogDispersionFloor instead (0.10 is roughly a 10% volume change). Expected volume and relative volume are still shown in normal volume units.
Combining them: the two options can be used together, and the cap then works in log units.
Validation and dashboard: OnInit rejects a non-positive cap sigma or log floor when the matching option is on. The dashboard gets a “Model” line showing raw or log and the cap.
Thresholds: Z is a different statistic in log mode, so VolumeZThreshold and DecayZThreshold will need re-tuning if you turn it on.




euro_rapp wrote: Sat Nov 14, 2026 2:35 pm Hey guys! I wanted to share an indicator i devloped. Pipa gave me the idea of incorporating a session based value into existing indicators. I wanted something like the TDFI but based on sessions. Instead of using standard moving averages, it evaluates breakout volume using a time-of-day baseline—comparing the current minute's volume directly to historical sessions at that exact same time of day. By combining this Z-score volume normalization with an ATR-based price range check, it helps filter out low-volume noise and identifies true institutional breakouts from trading ranges. Of course i used AI to programm it for me, but the results have been somewhat of a letdown. But its solely a graphical issue, the indicator works as it should. Maybe some of the master programmers can perfect it. Give it a try and let me know what you think!