HomeSample Page

Sample Page Title


Automated Pattern Re-Entry Detection: How the Corex Good Bear Bull Indicator Combines Fusion Smoothing with WPR Confidence Scoring

Introduction

Pattern merchants face a well-recognized paradox. The alerts that arrive early sufficient to seize most of a transfer are additionally the alerts that fireplace at each minor wiggle of value. Tighten the filters and also you arrive late; loosen them and you are taking the whipsaws. Add the third headache — instruments that “uncover” yesterday’s sign right now by repainting as soon as the bar closes — and the result’s a workflow that consumes consideration with out producing edge.

The Corex Good Bear Bull Indicator is constructed round a special thought. As a substitute of 1 transferring common racing one threshold, it makes use of a five-component Fusion engine to determine the regime, a triple-stack of Williams %R oscillators to time the re-entry, and a confidence layer that grades each sign on a 0-100 scale earlier than it seems on the chart. Each label, triangle, and exit mark is locked at confirmed bar shut, so the chart you see is the chart that can be there tomorrow.

This text walks by way of the engine end-to-end. We cowl what the Fusion smoothing really does, how the cloud shade tracks regime power, what every of the six WPR sub-triggers detects, how the boldness rating is constructed, and the way the pattern alignment gate retains counter-trend entries from leaking by way of. By the tip you’ll know what each line, label, and quantity on the chart means.

Obtain the indicator: 

The Pattern-Follower’s Three Issues

Earlier than describing the engine, it’s price stating what the engine is fixing. Three issues present up in each trustworthy trend-following workflow.

Late entries. Single-MA pattern techniques set off after the transfer has already established. By the point value has crossed the 200 EMA, the Quick WPR is overbought, the following pullback is about to print, and the dealer is sitting in drawdown earlier than the place even matures. The lag is structural — it’s the price of utilizing a single common.

Whipsaw exits. Filters assist, however each extra filter provides latency. Anticipate ADX to rise, for quantity to spike, for 2 MAs to cross, and the transfer is half finished. With out these filters, the system flips long-short-long-short on each consolidation.

Repainting instruments. Many indicators look implausible on a backtest as a result of they redraw their very own previous. A sign that “appeared” three bars in the past wasn’t there in actual time — it appeared as a result of the newest two bars revised historical past. Repainting instruments can’t be traded ahead.

Corex Good Bear Bull addresses all three directly: a smoothing layer that tames lag with out changing into noisy, a confidence pipeline that filters alerts on the supply as an alternative of stacking filters serially, and a strict closed-bar-only state machine that guidelines out repainting by development. The rest of this text describes how these three layers match collectively.

The Fusion Engine: 5 MAs and a VWAP

The Fusion line is the indicator’s core. It’s a single value monitor, however it’s calculated as the common of 5 separate smoothing strategies over the identical size:

  1. EMA — exponential transferring common; weights latest bars heavier. Reactive to the most recent value.
  2. SMA — easy transferring common; treats each bar within the window equally. Steady however sluggish.
  3. LWMA — linearly weighted transferring common; bridges EMA and SMA with a linear weight schedule.
  4. ALMA — Arnaud Legoux transferring common with offset 0.85 and sigma 6. Gaussian-weighted with the height shifted towards the newest bar; reduces part lag with out amplifying noise the way in which an EMA does.
  5. VWAP — session-anchored volume-weighted common value computed throughout the present UTC buying and selling day. Pulls the mix towards the consensus value of the day reasonably than purely time-weighted value motion.

Every of these 5 strategies alone will whipsaw or lag relying on market circumstances. Averaged collectively, the contribution of anybody methodology is bounded. When ALMA jerks early right into a transfer, SMA and VWAP maintain the mix again. When SMA lags by way of a flip, EMA and ALMA pull the mix ahead. The five-way mix is the smoothing equal of a weighted vote.

The mix is computed at a configurable size (default 122 bars). Shorter lengths make the Fusion engine extra reactive and produce extra BULL / BEAR pattern modifications; longer lengths produce a smoother, extra steady line that flips much less typically. 122 is chosen as a stability that captures intraday swings on H1-H4 charts and every day swings on D1.

Quick and Sluggish Smoothing and the Pattern Cloud

The uncooked Fusion mix is then smoothed twice extra by two impartial EMAs. The primary EMA ( InpSens1 , default 12) produces the Fusion Sluggish line. The second EMA ( InpSens2 , default 5) produces the Fusion Quick line. Each are drawn on the chart, and each are coloured within the bull yellow-green palette.

The area between Fusion Quick and Fusion Sluggish is crammed with the pattern cloud. When the Quick line sits above the Sluggish line, the cloud renders in vibrant yellow-green; when the Quick line crosses under the Sluggish line, the cloud flips crimson. That is applied by way of MetaTrader’s  DRAW_FILLING  model, which natively helps a two-color “above” / “under” rendering — no per-bar object creation, no chart-object restrict stress, no repaint danger.

The cloud is the at-a-glance regime indicator. Two studying guidelines:

  • Cloud shade matches the bar’s route → pattern is undamaged, maintain the place.
  • Cloud shade flips towards the bar’s route → regime is rolling over, search for the BULL or BEAR label that may print on the following confirmed shut.

The Quick / Sluggish smoothing pair provides the cloud a significant width: when the pattern is powerful, the 2 strains diverge and the cloud is visibly thick; when momentum is fading, they compress and the cloud pinches. A pinched cloud at a horizontal flip is likely one of the cleanest visible cues for an upcoming flip.

The Williams %R Triple Stack

The Fusion engine identifies the regime. The re-entry layer makes use of three Williams %R oscillators to time entries inside that regime. Williams %R is a momentum oscillator scaled from 0 (equal to the latest excessive) to -100 (equal to the latest low). Values above -20 are thought of overbought; values under -80 are thought of oversold.

Three WPR oscillators run concurrently:

  • Quick WPR (default interval 21) — the entry-timing oscillator. Tracks short-term overbought / oversold circumstances; that is the road whose crosses generate triangles.
  • Sluggish WPR (interval 55) — confirms intermediate momentum. A purchase that’s in step with a Sluggish WPR turning up is extra dependable than one which fights the Sluggish WPR.
  • Turtle WPR (interval 120) — the macro context oscillator. Mixed with the Sluggish WPR, it defines whether or not the bigger pattern helps or opposes the purchase.

All three are learn on each confirmed bar shut. The mix of values is what produces the sign differentiation within the subsequent part: a Quick WPR cross alone is a weak sign; the identical cross with the Sluggish and Turtle WPRs already trending in the identical route is a high-confidence continuation; the identical cross with the Turtle WPR sitting within the opposing excessive is a counter-trend setup that the pattern gate will block.

Introducing the Corex Good Bear Bull Indicator

The Corex Good Bear Bull Indicator implements the Fusion engine, the WPR triple stack, and a six-trigger re-entry layer with a 0-100 confidence rating on each sign. It runs on MetaTrader 4 and MetaTrader 5 with bit-identical calculation logic between the 2 builds.

The chart visuals are deliberately compact:

  • Three EMA strains on the user-configurable Quick (21) / Medium (55) / Sluggish (120) durations
  • Two Fusion strains (Sluggish at width 2, Quick at width 1)
  • One pattern cloud filling the area between Fusion Quick and Fusion Sluggish
  • BULL / BEAR textual content labels at trend-flip bars (cooldown-protected to keep away from label spam)
  • Re-entry triangles (▲ for lengthy, ▼ for brief) positioned at ATR-offset distance from the bar’s excessive or low
  • Exit X marks (when the energetic pattern provides up after an entry has been taken)
  • Dotted connector strains from the bar’s excessive or low to its corresponding triangle or X

That’s the whole on-chart vocabulary. Six visible parts, all keyed to confirmed bar shut, all idempotent throughout re-evaluations.


How Indicators Hearth

The sign layer is a small state machine that lives on high of the Fusion regime detection. The states and transitions are:

State Set off Drawing —– ——- ——- Impartial n/a (none) Bull BULL pattern label fires “BULL” textual content under the bar → Re-entry Lengthy Confidence-passing purchase sign Up triangle under bar → Exit Lengthy Confidence-passing promote sign X mark above bar Bear BEAR pattern label fires “BEAR” textual content above the bar → Re-entry Brief Confidence-passing promote sign Down triangle above bar → Exit Brief Confidence-passing purchase sign X mark under bar

A BULL label fires the bar after  Shut > Fusion Sluggish  turns into true, the Fusion Sluggish slope is up, the earlier bar was bearish or impartial, and the cooldown window (default 25 bars) has elapsed for the reason that final BULL label. The BEAR label is the symmetric mirror.

As soon as a BULL label has been printed, the indicator is “in bull” and any confidence-passing purchase sign produces a re-entry triangle. As soon as an entry triangle has been drawn, the indicator’s “has-entry” flag is ready; from that second any confidence-passing promote sign produces an exit X mark — however solely the X mark, not a re-entry. The bear-side state machine is symmetric.

The non-repainting assure is constructed into this state machine. Three guidelines collectively produce the assure:

  1. Closed-bar analysis solely. All sub-triggers, all confidence calculations, and all state mutations run solely on bars with shift ≥ 1. The forming bar (shift 0) writes its line buffers however by no means fires a label.
  2. One-shot state mutations. State variables (present pattern, has-entry flag, cooldown counter) replace solely when the bar’s timestamp is strictly newer than the final processed timestamp. Re-evaluations of the identical bar throughout ticks don’t double-fire.
  3. Idempotent drawings. Each chart object title is keyed by the bar’s timestamp. Re-drawing the identical sign title on the identical bar overwrites in place reasonably than producing a replica.

A sign that printed yesterday can be in the identical place tomorrow. A sign printed three minutes in the past on a closed M15 bar can be in the identical place once you reopen the chart in three days. There isn’t a “look-ahead”, no two-bars-back revision, no repaint.

The Six Sub-Triggers

A re-entry triangle is drawn solely when at the least one of many six AlphaX Professional sub-triggers fires. Every sub-trigger encodes a special studying of the WPR triple stack.

Divergence Set off. The indicator tracks the newest two pivot lows (and pivot highs) detected with a 5-bar left / 5-bar proper affirmation. A bullish divergence fires when the present pivot low is decrease in value however larger in Quick WPR than the earlier pivot low — a basic “decrease low in value, larger low in momentum” sample — and Quick WPR velocity is constructive. The bearish divergence is the mirror.

Excessive Snap. The earlier bar’s Quick WPR was under -88 (deeply oversold) for a purchase, or above -12 (deeply overbought) for a promote. The present bar crosses again by way of the brink with constructive Quick WPR velocity and at the least considered one of Turtle WPR or Sluggish WPR not within the excessive bear place. The Snap is constructed for sharp reversal entries from over-extension.

Exhaustion. A milder model of the Snap. Earlier bar’s Quick WPR under -78 (or above -22), the macro stack moderately balanced, velocity constructive, and a contemporary Quick WPR cross. Exhaustion catches the entries the place the transfer has been “drained” for just a few bars reasonably than violently snapped.

Continuation. Macro stack already aligned (Very-Sturdy or Sturdy uptrend / downtrend regime, with Sluggish or Turtle WPR slope confirmed) and a contemporary Quick WPR cross. The Continuation set off is for including to a clearly established pattern on the following pullback.

Pullback. Reasonable uptrend (Sluggish WPR > -60) or average downtrend (Sluggish WPR < -40) with a Quick WPR cross and confirmed velocity. The Pullback is between Continuation (which requires a fully-aligned macro stack) and Snap (which requires excessive Quick WPR readings). It’s the commonest single set off in a standard trending surroundings.

Triple. All three WPRs concurrently oversold (or overbought) with a Quick WPR cross. The Triple is the rarest however most decisive sign — when it fires, it nearly at all times coincides with a significant reversal.

A sign can fireplace a number of sub-triggers directly. When two or extra fireplace on the identical bar, the boldness stacking bonus provides further factors (described within the subsequent part).

Confidence Scoring 0-100

Each potential sign — purchase or promote — is scored on a 0-100 scale. The rating is the sum of additive components minus the sum of subtractive components, clamped to the [0, 100] vary. Solely alerts that meet or exceed  InpMinProConfidence  (default 14.0) are accepted.

Additive components (purchase aspect; promote aspect is the mirror)

IssueMostWhen it provides
Turtle WPR degree+25Turtle WPR > -35 (deep bull macro)
Quick WPR excessive+20Quick WPR < -94 (deep oversold timing)
Greatest sub-trigger+20Triple purchase fired
Velocity high quality+15Quick WPR velocity in IDEAL vary
Session high quality+10London-NY overlap session
Value / EMA alignment+5Shut above 200 EMA AND 50 EMA above 200 EMA
Stacking bonus+15Three or extra sub-triggers fireplace on the identical bar

Subtractive components

IssueMostWhen it subtracts
Velocity overshoot-10Quick WPR velocity exceeds the EXTREME threshold
RSI overheat-814-period RSI > 72 (purchase) or < 28 (promote)
Off-hours session-10Asian session for buys (or NY-close for each)
Low quantity-5Present bar quantity under 70% of 20-bar common

The complete additive desk consists of graded ranges — Turtle WPR provides +20 / +12 / +5 at progressively much less excessive thresholds, Quick WPR provides +16 / +12 / +6 equally — so the rating easily rewards alerts the place a number of components coincide and penalizes alerts which might be technically legitimate however arrive in low-quality circumstances.

The default acceptance ground of 14.0 is deliberately permissive on the high-frequency finish. Conservative merchants ought to increase it to 30 or larger to filter out the marginal entries; aggressive setups can decrease it to eight or 10. The ground interacts with the pattern gate and restoration mode (subsequent part), so adjusting all three collectively provides probably the most helpful flexibility.

Pattern Alignment Gate and Restoration Mode

Even with the boldness ground in place, alerts can nonetheless seem throughout robust opposing macro traits. A purchase sign throughout a clear downtrend is mathematically legitimate however virtually dangerous. The pattern alignment gate is the indicator’s safety layer for precisely this case.

Sturdy-Pattern Detection. The gate checks whether or not each the Turtle WPR and the Sluggish WPR sit on the identical aspect of two configurable thresholds. By default, a robust uptrend is detected when Turtle WPR > -35 and Sluggish WPR > -40; a robust downtrend when Turtle WPR < -65 and Sluggish WPR < -60.

Counter-Pattern Block. When a robust opposing pattern is detected, the gate blocks the sign. A purchase sign throughout a robust downtrend produces no triangle; a promote throughout a robust uptrend produces no triangle. That is the first counter-trend safety.

Restoration Mode. The gate will not be infinitely strict. The consumer can allow Restoration Mode ( InpEnableProRecoveryReq = true , default) which provides a bypass: if the Quick WPR has bounced at the least  InpProRecoveryMinMove  (default 6 factors) throughout the final  InpProRecoveryBars  (default 3) bars and the bounce got here from a deep sufficient excessive (-80 oversold for purchase bounce, -20 overbought for promote bounce), the gate permits the sign by way of. The instinct is that actual reversals present up as sharp WPR strikes earlier than they present up as value strikes; if the WPR is already reversing, the purchase will be allowed though the macro pattern remains to be down on paper.

Strict Mode. A separate toggle ( InpProTrendGateStrict = true , default) tightens the strong-trend thresholds by 5 factors on either side. With strict mode on, the gate triggers earlier and blocks extra alerts. With strict mode off, the gate triggers solely at deeper extremes.

The interplay between the boldness ground, the pattern gate, and the restoration requirement is the principle tuning floor for the indicator. Three helpful presets:

  • Conservative.  InpMinProConfidence = 35 , gate ON, strict ON, restoration OFF. Few however very high-quality alerts.
  • Normal. Defaults as shipped ( 14 , gate ON, strict ON, restoration ON). Balanced.
  • Aggressive.  InpMinProConfidence = 8 , gate ON, strict OFF, restoration ON. Extra alerts, extra noise.

The Six-Channel Alert Bundle

Three occasion varieties and 4 supply channels mix right into a 12-channel alert matrix. The occasions are:

  • InpAlertOnTrendChange  — fires on every BULL or BEAR pattern label
  • InpAlertOnEntry  — fires on every re-entry triangle
  • InpAlertOnExit  — fires on every exit X mark

The supply channels are:

  • InpAlertPopup  — popup dialog inside MetaTrader (default ON)
  • InpAlertPush  — cell push to the MT4 / MT5 app through your MetaQuotes ID
  • InpAlertEmail  — e-mail supply through the platform’s SMTP configuration
  • InpAlertSound  — native sound file (default  alert.wav )

Each alert is fired precisely as soon as, on the bar’s first confirmed shut. The message format is:

Corex Good Bear Bull: {EVENT} ({SYMBOL} M{PERIOD})

Examples:

  • Corex Good Bear Bull: BULL pattern (EURUSD M30)
  • Corex Good Bear Bull: Re-entry LONG (XAUUSD M15)
  • Corex Good Bear Bull: EXIT brief (GBPUSD M60)

The format is equivalent on MT4 and MT5, which makes filtering / parsing on the receiving aspect simple.

Sensible Buying and selling Workflow

The meant day-to-day workflow with the indicator is brief.

  1. Drop the indicator on the chart. Defaults are tuned for H1-H4 foreign exchange, however they work on any timeframe. The primary BULL or BEAR label seems as quickly as sufficient historical past is loaded (at the least 250 bars).
  2. Anticipate a pattern label. The chart is in a “no opinion” state till BULL or BEAR fires. Till then, no triangles can seem by development — the state machine has not entered a pattern.
  3. Anticipate a triangle. When the primary re-entry triangle fires contained in the energetic pattern, the engine is signaling that a number of sub-triggers have aligned and the boldness is above your ground. The triangle marks the entry bar.
  4. Handle with the cloud. So long as the cloud shade matches the pattern label’s route, the pattern is undamaged. A pinching or flipping cloud is the early warning that the regime is rolling over.
  5. Shut on X or pattern flip. Both the indicator prints an exit X (a confidence-passing reverse sign arrived inside the identical pattern) or it prints the other pattern label (BULL → BEAR or BEAR → BULL). Both is a sound exit; X is “the transfer seems to be over throughout the pattern”; reverse label is “the pattern itself has reversed”.

Throughout timeframes, solely  InpMinProConfidence  usually wants adjustment. Decrease timeframes (M5, M15) profit from a better ground (25-40) to filter the noise; larger timeframes (H4, D1) work properly on the default 14 as a result of the underlying signal-to-noise is already larger.

Parameter Reference

Defaults under match the supply  .mq5  declarations precisely; the validator will examine them.

Fusion System

EnterDefaultVaryDescription
InpFusionLength1227-200Fusion mix size
InpSens1123-20Fusion Sluggish sensitivity
InpSens252-15Fusion Quick sensitivity
InpShowCloudtrueboolPresent the pattern cloud

EMA Settings

EnterDefaultVaryDescription
InpShowEmaFasttrueboolToggle Quick EMA
InpShowEmaMediumtrueboolToggle Medium EMA
InpShowEmaSlowtrueboolToggle Sluggish EMA
InpEmaFastLength211-500Quick EMA size
InpEmaMediumLength551-500Medium EMA size
InpEmaSlowLength1201-500Sluggish EMA size

AlphaX Professional Settings

EnterDefaultVaryDescription
InpFastWPRPeriod213-24Quick Williams %R interval
InpSlowWPRPeriod5515-60Sluggish Williams %R interval
InpTurtleWPRPeriod120100-500Turtle Williams %R interval
InpOversoldLevel-90-99 to -70Quick WPR oversold cross threshold
InpOverboughtLevel-10-30 to -1Quick WPR overbought cross threshold
InpProTrendLookback2010-50WPR slope window
InpMinProConfidence14.00-100Acceptance ground
InpEnableProTrendGatetrueboolCounter-trend gate
InpProTrendGateStricttrueboolTighten gate by 5 factors
InpProUptrendTurtleLvl-35.0Uptrend Turtle WPR ground
InpProUptrendSlowLvl-40.0Uptrend Sluggish WPR ground
InpProDowntrendTurtleLvl-65.0Downtrend Turtle WPR ceiling
InpProDowntrendSlowLvl-60.0Downtrend Sluggish WPR ceiling
InpEnableProRecoveryReqtrueboolRequire WPR restoration
InpProRecoveryBars32-10Restoration lookback
InpProRecoveryMinMove6.02-20Minimal restoration transfer

Filters, Date Window, and Show

EnterDefaultVaryDescription
InpTrendCooldown251-200Bars between BULL / BEAR labels
InpSignalAtrOffset2.40-10Triangle / X ATR offset
InpSignalLabelSizeSMALLenumTINY / SMALL / NORMAL
InpEnableDateFilterfalseboolProhibit alerts to a date vary
InpStartDate2026-03-20 00:00datetimeDate window begin (UTC)
InpEndDate2026-03-21 23:59datetimeDate window finish (UTC)

Theme and Alerts

EnterDefaultDescription
InpBullPrimary  /  InpBullBright  /  InpBullDimC’200,230,36′ / C’212,240,58′ / C’154,184,28′Bull palette
InpBearPrimary  /  InpBearBright  /  InpBearDimC’255,23,68′ / C’255,82,82′ / C’213,0,50′Bear palette
InpNeutralColorC’85,85,85′Exit X shade
InpEmaFastColor  /  InpEmaMedColor  /  InpEmaSlowColorC’200,230,36′ / C’136,136,136′ / C’85,85,85′EMA line colours
InpAlertOnTrendChange  /  InpAlertOnEntry  /  InpAlertOnExittrue / true / trueOccasion toggles
InpAlertPopup  /  InpAlertPush  /  InpAlertEmail  /  InpAlertSoundtrue / false / false / falseSupply channels
InpAlertSoundFile“alert.wav”Sound file

Conclusion

Most trend-following indicators are tuned round one resolution: the place the transferring common sits relative to cost. That single resolution works in clear traits and breaks in the whole lot else. Corex Good Bear Bull replaces the only resolution with a layered pipeline — a five-component Fusion mix that tames lag, a triple Williams %R stack that occasions re-entries, a six-trigger sub-system that captures completely different setup varieties, a 0-100 confidence rating that filters on the supply, and a counter-trend gate that protects towards the structural failure mode of trend-following.

The non-repainting assure is what ties the layers collectively. With out it, even an ideal sign pipeline produces a chart that lies. With it, each label, triangle, and X mark on the chart was true in the mean time the bar closed, and stays true perpetually after. The indicator is due to this fact instantly tradable from the chart: there isn’t any “anticipate the sign to verify” as a result of the sign is the affirmation.

The MT4 and MT5 builds are bit-identical in calculation logic and visually equivalent in output. Each compile clear underneath their respective MetaEditor variations, each move the mql5.com Market input-validation examine, and each are non-repainting by development. The complete dwell demo, parameter reference, and the 12-channel alert bundle are accessible from the Market itemizing:

Obtain the indicator: 

Threat Disclaimer

Buying and selling overseas alternate and CFDs on margin carries a excessive degree of danger and might not be appropriate for all buyers. You might maintain a loss exceeding your preliminary funding. Pattern Quorum is a technical evaluation device and doesn’t assure worthwhile trades. Previous efficiency will not be indicative of future outcomes. The authors settle for no legal responsibility for any loss arising from use of the indicator. By utilizing Pattern Quorum you acknowledge sole duty in your buying and selling selections.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles