Harmonic Patterns Scanner — Panel FxMath_Harmonic_Hunter_Scanner_Panel(MT5)

The Panel version of the Scanner. Same detection engine and settings as the classic Scanner, but the result table is a scrollable + sortable + filterable panel: mouse-wheel / ▲▼ scrolling, click-to-sort on any data column, and a filter toolbar (Type / Pattern / Time Frame / Acc / Age). Use this when there are more patterns than fit on screen.

File: FxMath_Harmonic_Hunter_Scanner_Panel(MT5).mq5/.ex5 10 visible rows 13 columns incl. Fltr mark Filter without re-scan On-chart confirmation filters
🧪 Free validation tools Want to test the harmonic method on your own broker history first? Download the free Backtest Panel (backtest + batch finder + screenshot shooter) and analyze every report online at analyzer.fxmath.net — see the Free Tools page for the step-by-step guide.

#Overview

Unlike the classic Scanner (which draws one edit-box row per signal and can run out of screen space), the Panel version stores every found signal as a row in memory (g_rows[]) and draws only the visible slice inside a scroll window. Filters and sorting operate on the stored results instantly — no re-scan needed — and combine with scrolling.

The scan loop runs from OnTimer() on a minutes-based interval with a g_scanBusy re-entry guard, so the timer and the Scan Market button never overlap — and it works with zero ticks.

#Classic Scanner vs Panel

FeatureClassic ScannerPanel Scanner
Row storageFixed edit boxes, one per signalRows stored in memory, visible slice drawn
More signals than screenRows overlap / get overwrittenScroll through all results
Sorting—Click any column header (asc/desc toggle)
Filtering—Type / Pattern / TF / Acc / Age toolbar
Scan triggerOnTick + OnTimerPure OnTimer (minutes) + button
Header redrawEvery tick (slower)Once on init + inside run()
View buttonsName per pair+tfUnique per row (view,<idx>,<pair>,<tf>)
Settings / engineIdentical (see Scanner docs)

#The signal table

The table has 13 columns — 11 data columns, a green/red Fltr confirmation mark, and an "Open Chart" action column:

#ColumnSortNotes
0PairAlphabeticale.g. EURUSD
1Time FrameBy minutesStored as minutes ("60","240"…), sorted numerically → M5 < H1 < H4
2PatternAlphabetical"Bullish Bat", "Bearish Crab"…
3Order TypeAlphabeticalBUY (blue) / SELL (red)
4Open PriceNumericEntry at 23.8% of CD
5StopLossNumeric5% beyond CD (or ATR × mult)
6TakeProfit 1Numeric38% of XA (or ATR × mult)
7TakeProfit 2Numeric61.8% of XA
8TakeProfit 3Numeric78.6% of XA
9AccNumericAccuracy % (0–100), graded vs unscaled bounds
10AgeNumericBars since the D point
11Fltr—Confirmation-filter mark: green OK (all enabled filters pass), red X (any fails), gray - (filters off). Not sortable.
12Open Chart—View button per row

Row cells are named pnl_row<slot>_<col> with fixed slots 0–9, so scrolling and filtering update text in place instead of recreating ~110 edit objects every time.

#Sorting

#Scrolling

#Filter toolbar

The filter bar sits above the table (FILTER_Y = 175) and has five rows:

RowControlBehaviour
1Type — ALL / BUY / SELLSingle select. Active button is highlighted (dodger blue).
2Pattern — Bat, Gartley, Crab, Butterfly, Cypher, Shark, ABCDMulti-select toggle. Any ON base name matches (the "Bullish/Bearish" prefix is ignored via Panel_BasePat). Wolfe is disabled, so it's not listed.
3Time Frame — ALL + distinct scanned TFsMulti-select of the TFs actually scanned (normalized to minute labels, e.g. "60", "240").
4Acc ≥ / Age ≤ edit boxes + Apply / ClearNumeric limits. Press Enter in the box or click Apply. Clear resets everything.
5Fltr — ON/OFF + Trend / RSI / S/R + HTF fieldConfirmation filters for the Fltr column. Master ON/OFF turns the mark on; each of Trend/RSI/S/R toggles green; the HTF field sets the higher timeframe for the Trend filter (label or minutes, e.g. H4/240). Toggling any of these recomputes the Fltr column in place — no re-scan.
💡 Instant Filters apply to the stored scan results — no re-scan is needed. They combine with sorting + scrolling and the Sleep(100) was removed from every filter/sort/scroll click so the panel feels instant.

#Filter logic details

Every row passes through Panel_Matches(r):

The row Fltr column is separate from the display filters above. It is a mark, not a filter: each row is evaluated against the enabled confirmation filters (Panel_FilterStatus) using the row's stored symbol/timeframe/D-shift/entry price, and shown green OK if all enabled filters pass, red X if any fails, or gray - if filters are off. Toggling Fltr/Trend/RSI/S/R or editing the HTF field recomputes the marks in place — it does not hide any row.

The Clear button resets: g_fType="ALL", empty pattern/TF sets, AccMin=0, AgeMax=0. Filters are kept across scans (Panel_Reset only clears the sort), so your view persists after an auto-update.

ℹ️ Enter key The Acc/Age edits are handled by CHARTEVENT_OBJECT_ENDEDIT: pressing Enter (or losing focus) applies the value immediately — no need to click Apply.

#Timer-driven scanning

This version fixes the classic Scanner's tick-driven behaviour:

#Settings (identical to the Scanner)

All inputs are the same as the classic Scanner (47 inputs), with one rename: Uodate_Interval_Minute → Update_Interval_Minutes (correct spelling). The same 14-entry pattern table, accuracy grading, SL/TP modes, trading mode, notifications and .Pouya writing apply. A quick reference:

GroupKey inputsDefaults
Scanner SettingsPairs, Read_MarketWatch_Pairs, TFs, Auto_Update, Update_Interval_Minutes, TakeProfit_Level30 pairs / 18 TFs / false / 15 / 2
Trading ModeClose_Partial_Trade, Close_Partial_Ratio, Breakeven_Enable, BE_Ratio_Distancetrue / 0.6 / true / 0.6
SL/TP ModeSLTP_Use_ATR, SLTP_ATR_Period, SLTP_ATR_SL_Mult, SLTP_TP1_Mult, SLTP_TP2_Mult, SLTP_TP3_Multfalse / 14 / 2.0 / 4.0 / 6.0 / 9.0
Pattern SettingsPattern_Accuracy, Maximum_Market_Bar_Scan, Minimum_Market_Depth, Maximun_Market_Depth, ExpirationTime_Candle, Maximum_Pattern_Age + 7 toggles80 / 20 / 25 / 50 / 15 / 15 / all true
NotificationsAlert_Enable, Email_Enable, PushNotification_Enable, Telegram_Enable, Telegram_Bot_Token, Telegram_Chat_IDall false
OtherMagicNumber, TradeComment, Helper_Text_Color, Pattern_Body_Color, ZigZag_Window_Bars3017 / FxMath_Harmonic_Hunter / white / yellow / 1000

#View / Open All Charts

#Panel internals

Constant / varValuePurpose
PANEL_ROW_H25Row pitch (px)
PANEL_ROW_VIS10Visible rows without scrolling
PANEL_TOP307Y of the first row
PANEL_COL_X[12]{40,121,207,338,419,500,581,662,743,824,905,986}Column X positions
PANEL_COL_W[12]{72,77,117,67,67,67,67,67,67,67,32,117}Column widths
STATUS_Y152"Scanning…" status line (below Open All Charts)
FILTER_Y175Top of the filter toolbar
g_rows[] / g_rowCountdynamicStored signal rows
g_scrollOff / g_sortCol / g_sortAsc0 / -1 / trueScroll + sort state
g_fType / g_fPats[] / g_fTfs[] / g_fAccMin / g_fAgeMax"ALL" / [] / [] / 0 / 0Filter state
g_scanBusyfalseRe-entry guard for run()
g_mouseOverPanelfalseHover flag for wheel scrolling

#FAQ & troubleshooting

Why is a pattern not in the filter list?

Wolfe Waves are disabled (code kept, default false), so they're intentionally not listed. The other 7 families cover all 14 built-in table entries.

My filter buttons did nothing in an old version — is that fixed?

Yes. There were off-by-one bugs parsing the Pattern (pnl_f_pat_ = 10 chars) and Time Frame (pnl_f_tf_ = 9 chars) button names which silently made those two filters no-ops. Fixed in the current code.

The table rows overlap / look wrong after sorting

Rows are drawn into fixed slots 0–9; sorting only changes which stored row index each slot shows. If you see stale text, re-run a scan (Scan Market) — the reset clears the sort and redraws cleanly.

Scans are slow

Trim Pairs / TFs, reduce ZigZag_Window_Bars, or narrow the depth range. The panel redraws only the visible 10 rows, so UI cost is constant regardless of result count.

Does the panel still write the .Pouya file?

Yes — identical to the classic Scanner, so either version can feed the Helper.