MQT_HighLowSlopePredictor

Forward Probability From High–Low Slope Structure

MQT_HighLowSlopePredictor learns statistically valid forward‑bar probabilities from recurring high and low slope sequences. Patterns are ranked by raw probability or Wilson lower‑bound stability and plotted directly on the chart with visual confidence cues.

Back to Indicators

Key Features

Slope Pattern Learning

Bucketized high/low slope sequences are continuously learned from daily data.

Forward‑Bar Probabilities

Tracks outcome probabilities from +1 through +N bars after a signal.

Raw vs Stability Ranking

Choose between raw probability or Wilson lower‑bound stability scoring.

Unstable Pattern Detection

Visually flags low‑sample or statistically fragile patterns.

Heatmap or Text Display

Render probabilities as labeled columns or compact heatmap blocks.

CSV Export & Leaderboard

Export pattern statistics and rank top‑performing sequences.

Chart Examples

Probability Blocks & Pattern Window

Forward probabilities displayed with stability‑aware labeling

Unstable Pattern Highlighting

Automatic visual warnings for statistically weak signals

How It Works

1

Tokenize Slopes

High and low slopes are converted into directional buckets.

2

Learn Outcomes

Forward closes are tracked to build probability distributions.

3

Rank & Filter

Patterns are ranked by probability or statistical stability.

4

Plot Signals

Qualified patterns are drawn with arrows, labels, and shading.

Indicator Settings

Setting Type Typical Values Description
Slope Bucket Size Numeric Small / Medium / Large Controls how aggressively high/low slopes are grouped into repeating “tokens.” Smaller buckets create more unique patterns; larger buckets generalize more.
Sequence Length Integer 3–10 Number of consecutive slope tokens used to define a pattern before calculating outcomes.
Forward Bars (N) Integer 1–20 How many bars ahead the indicator measures outcomes and computes probability columns (+1 … +N).
Ranking Mode Dropdown Raw / Wilson Ranks patterns by raw probability or by Wilson lower bound to favor stability when sample size is limited.
Minimum Sample Size Integer 20–200 Filters out patterns that do not occur often enough to be statistically meaningful.
Unstable Pattern Threshold Numeric Low / Medium / High Controls when the indicator visually flags a pattern as unstable (ex: too few occurrences or weak lower‑bound confidence).
Display Mode Dropdown Text / Heatmap Choose between probability text columns or compact heatmap blocks.
Show Leaderboard Boolean On / Off Displays a ranked list of top patterns based on the selected scoring mode.
CSV Export Button / Boolean On demand Exports pattern stats (counts, probabilities, stability metrics) to CSV for spreadsheet review.
Color / Confidence Cues Style Default / Custom Controls how strong vs weak patterns are colored or labeled on the chart.

Note: The exact parameter names depend on the installed build of the indicator. If you paste the NinjaTrader property section for this indicator, I can convert the table above into exact names + default values (matching your code 1:1).

FAQ

Does this indicator “predict” the future?

It does not forecast price directly. It measures how often certain slope sequences were followed by specific outcomes in the past and plots those probabilities for context.

What’s the difference between Raw Probability and Wilson ranking?

Raw ranking favors the highest observed win rate. Wilson lower‑bound ranking penalizes low sample sizes and favors patterns that are statistically more stable.

Why are some patterns marked “unstable”?

Unstable flags typically indicate too few occurrences or insufficient statistical confidence. Increase the minimum sample size or use Wilson ranking for more conservative results.

How many forward bars should I use?

Start small (ex: 1–5) to evaluate immediate follow‑through. Use larger values to study multi‑bar continuation, but expect more noise and fewer clean patterns.

Will it repaint?

Plotted probability blocks can update as new data arrives and as the pattern database grows. Once a bar is closed, its slope inputs are fixed; the statistical model can still evolve with more history.

Is it better on certain instruments or timeframes?

It works anywhere slopes are meaningful, but results are instrument/timeframe dependent. Use the CSV export to validate what patterns are robust for your specific market.

How do I avoid overfitting?

Use larger bucket sizes, require higher minimum sample sizes, and prefer Wilson ranking. Always validate on out‑of‑sample periods before relying on any pattern set.

What’s included in the CSV export?

Typically: the slope token sequence, occurrence count, forward probabilities (+1…+N), and any stability or confidence metric used for ranking.

Back to Indicators