Abiroid Last Time Here Explained (MT4 & MT5)

Abiroid Last Time Here Explained (MT4 & MT5)

6 June 2026, 14:33
Abir Pathak
0
52

Links:

MT4:

https://www.mql5.com/en/market/product/180146/

MT5:

https://www.mql5.com/en/market/product/180147/








What Is "Last Time Here"?

Every price move in the market has happened before — or something very similar to it has. "Last Time Here" is an indicator for MetaTrader 4 and MetaTrader 5 that asks a simple question: the last time price was in this exact zone, what did it do next?

The indicator identifies the current active ZigZag leg — the most recent swing move from the last confirmed low to the last confirmed high, or vice versa. It then searches back through history to find previous instances where price traveled through that same zone in the same direction. Each historical match is displayed as a miniature candlestick replay directly in your chart's subwindow, so you can visually compare past behavior to the current moment side by side.

Think of it as a pattern mirror. Instead of memorizing chart history or toggling back and forth, you get the relevant past context shown right next to your current setup.


Features at a Glance

  • Automatically detects the current ZigZag swing leg (high→low or low→high)
  • Searches historical bars for matching legs in the same price zone and direction
  • Displays up to N historical matches as actual candlestick replays in a subwindow
  • Shows the ZigZag structure connecting each matched segment
  • Works on any symbol and timeframe — including a different pair/TF than the main chart
  • Mirror lines: automatically mirrors any lines you draw in the subwindow back to the main chart (and vice versa)
  • Supports multiple instances simultaneously, each with its own prefix, pair and timeframe
  • Segment labels and separator lines for visual clarity between each matched replay
  • Fully configurable colors, ZigZag parameters, lookback depth, and number of matches
  • Shows a "No matches found" notice with available bar count when history is insufficient

How It Works — The Core Idea

The indicator is built around the ZigZag indicator, which breaks down price action into a sequence of alternating highs and lows called "swing nodes." Each pair of consecutive nodes defines a leg — a directional move from one swing point to the next.

Here is the step-by-step logic:

  1. Identify the current leg. The most recent two ZigZag nodes are found. If the newest node is a swing high, the current leg moved upward (from a low to a high). If it is a swing low, the leg moved downward.
  2. Define the zone. The current leg's high and low values form a price zone. For an upward leg, this means price traveled from the low boundary up through the high boundary.
  3. Search history. The indicator scans all previous ZigZag legs going back through your Lookback Bars setting. It looks for legs that also traveled in the same direction and crossed through that same price zone — specifically, legs where the start was at or below (for up-legs) the zone's low and the end was at or above the zone's high.
  4. Draw the matches. Each matched leg — along with a user-defined number of bars before and after it — is drawn as a candlestick replay in the subwindow. A dotted vertical separator line divides each match from the next, and optional ZigZag lines are drawn over the candles to make the swing structure visible.



How to Use the Indicator

Running Multiple Instances

You can run more than one copy of the indicator on the same chart at the same time. Each instance gets its own subwindow. To do this correctly:

  • Give each instance a unique Prefix (e.g. ABR_LAST_A_ and ABR_LAST_B_ ) so their objects do not conflict with each other.
  • Drag the second copy directly onto the main candlestick area of the chart (not into the existing subwindow). MetaTrader will then create a new separate subwindow for it.
  • Each instance can track a completely different pair and timeframe.


This will be very useful for basket trading when you are looking at a particular currency.


Watching a Different Pair or Timeframe

The Trade Pair and Timeframe inputs let each subwindow instance analyze a symbol or timeframe that is different from your main chart. For example, you could have your main chart open on EURUSD H1, but have one subwindow running GBPUSD M15 and another subwindow running USDJPY H4.

When a different pair/TF is selected, the subwindow candles and ZigZag analysis are all based on that chosen pair. The Mirror Objects feature (drawing lines from the subwindow onto the main chart) is automatically disabled when the pair or TF does not match the main chart, since the price scales would not align anyway.


Reading the Subwindow

  • The leftmost segment (immediately after the first separator) is the current live leg. This is what is happening right now.
  • The segments to the right are historical matches, ordered with the most recent match first.
  • Each match shows how many bars before and after the matching leg are included, controlled by the Past ZZ Count and Future ZZ Count settings.
  • Optional bar labels at the top of each segment tell you the bar index range for context, if you need to trace back to the main chart.
  • ZigZag lines drawn in the same color are overlaid on the candles when enabled.




Using the Mirror Lines Feature

When Show Mirror Objects is enabled and the subwindow's pair and timeframe match the main chart, any trend line, horizontal line, or similar object you draw in the subwindow is automatically mirrored to the main chart at the same price levels. This works the other way too — lines drawn on the main chart are reflected into the subwindow.

This is especially useful when you have identified a key level in a historical match and want to draw it onto the live chart without switching back and forth.



Practical Trading Ideas

Identifying Likely Reactions at Key Levels

Look at how price behaved in the matched segments after it completed the same type of leg you are currently in. If multiple matches all show a sharp reversal immediately after finishing the leg, that adds confluence to a potential reversal trade. If the matches show continuation, the market historically tended to keep pushing.

Stop Placement

The matched segments show you the full candle range — highs, lows, wicks, and closes — for the equivalent historical period. Look at the extreme swing points in the matched segments just beyond the current zone. If every match showed the swing extreme was no more than 20 pips beyond the zone boundary, that gives you a data-backed reference for stop placement rather than guessing.

Timing Exits

The Draw Future ZZ Count setting controls how many ZigZag legs after each matched segment are shown. Set this to 1 or 2 to see what typically happened immediately after the matched zone played out — this can help you decide where to take profit.

Multi-Timeframe Confluence

Run one instance on your main chart's pair and timeframe for your primary analysis. Run a second instance on a higher timeframe (same pair). If both subwindows show historical matches pointing in the same direction, you have context from two timeframe perspectives simultaneously.


Cheat Sheet: Recommended Settings by Style

Trading Style Lookback Bars Max Patterns ZZ Depth / Dev / Backstep Past ZZ / Future ZZ
Scalping (M1–M5) 5,000 – 10,000 3 – 5 8 / 3 / 2 1 / 1
Intraday (M15–H1) 10,000 – 20,000 4 – 6 12 / 5 / 3 (default) 2 / 2
Swing Trading (H4–D1) 20,000 – 50,000 3 – 4 18 / 8 / 5 3 / 2
Position / Weekly 50,000+ 2 – 3 34 / 13 / 8 3 / 3


Tip: Lower ZigZag Depth values catch smaller swings and give you more nodes to match against, which suits fast timeframes. Higher Depth values filter out the noise and only flag major structural swings, which is better for higher timeframes.


Tip: If you are seeing "No matches found," try increasing the Lookback Bars first before changing ZigZag settings. If the bar count shown in the notice is already very high (e.g. 60,000+), the ZigZag parameters may be so specific that no historical leg matches the exact zone — try slightly reducing the ZZ Deviation.


Settings Explained



Main Section

Prefix: A unique text label attached to every chart object this instance creates. If you run more than one copy of the indicator on the same chart, each must have a different prefix. Default: ABR_LAST_ .

Trade Pair: The currency pair or symbol to analyze. Leave blank to use the current chart's symbol. If you enter a symbol here (e.g. GBPUSD ), all candles, ZigZag calculations, and pattern searches will be based on that symbol's price data instead of the main chart.

Timeframe: The timeframe to analyze. Defaults to the current chart's timeframe. You can select any standard timeframe (M1, M5, M15, M30, H1, H4, D1, W1, MN) independently from the main chart.

Shift Bar: How many bars from the right edge of the subwindow to leave empty before drawing begins. Default is 1 (one empty bar at the right). This is purely a visual offset — it does not affect which ZigZag leg is detected.

Start From Bar: How many bars back from the current bar the ZigZag scan should begin. Default is 0 (starts from the very latest bar, so the most recent completed swing is the "current" leg). Set this to a higher number to skip recent bars and treat an older leg as the one to match against. For example, setting it to 50 means the indicator ignores the last 50 bars and treats the next ZigZag leg it finds (starting from bar 50 back) as the reference leg. Useful when the current leg is still forming and you want to analyze the previous completed leg instead.

Lookback Bars: How far back in history to search for matching legs. The more bars you include, the better the chance of finding relevant historical matches, but it also takes marginally more time to calculate. Default: 10,000. The "No matches found" label will tell you the maximum bars actually available from MetaTrader's stored history if this value is set higher than what is loaded.

Max Patterns to Find: The maximum number of historical matches to draw. Default is 4. Increasing this to 6 or 8 gives you more samples but makes the subwindow wider and can become visually cluttered. Start with 4 and increase if you want a larger sample size.


ZigZag Section

ZZ Depth: Controls the minimum number of bars between two ZigZag turning points. A higher depth means the indicator only captures major swings and ignores small fluctuations. Lower values capture more frequent minor swings. Default: 34.

ZZ Deviation: The percentage deviation (in points) required to form a new ZigZag turning point. A higher value makes the ZigZag less sensitive and only flags significant direction changes. Lower values make it more reactive. Default: 13.

ZZ Backstep: The minimum number of bars that must pass before the ZigZag can form a new turning point in the same direction. This prevents very close peaks or valleys from both being labeled. Default: 8.


Display Section

Show ZZ Lines for Matched Segments: When enabled, blue (or your chosen color) ZigZag connecting lines are drawn over the matched candlestick replays so you can clearly see the swing structure within each historical segment. Useful for context. Default: On.

Draw Subwindow Objects in Main Window: When enabled, trend lines and horizontal lines drawn in the subwindow are automatically mirrored to the main chart, and vice versa. Only active when the subwindow's pair and timeframe match the main chart. Default: On.

ZZ Line Color: The color for ZigZag connector lines drawn over the matched segments. Default: Dodger Blue.

Bullish Candle Color: The fill color for upward-closing (bullish) candles in the subwindow replay. Default: Lime.

Bearish Candle Color: The fill color for downward-closing (bearish) candles. Default: Red.

Neutral Colors (Doji / Line Separators): Used for doji candles (open equals close) and for the vertical separator lines between segments. Default: Dark grey.

Background Color (MT4 overdraw): An MT4-specific visual workaround. In MT4, the histogram-based candle drawing technique requires a "background" bar to mask the gap between the body bottom and the wick bottom. Set this to match your chart background color (usually black or white). Mostly not noticeable in normal use.

Show Bar Segment Labels: Toggles the small text labels that appear above each segment showing the bar index range (e.g. "Bars45-60"). Useful for pinpointing exactly which historical period a match corresponds to. Default: On.

Spacing Bars Between Segments: The number of empty bars inserted as a gap between each replayed segment. Default: 3. Increase for more breathing room between segments, decrease to pack them closer together.

Past Matched ZZ Count to Draw: How many ZigZag legs before the matched leg to include in the replay. A value of 2 means you will see 2 swing legs of price history leading up to the matching moment, giving you context for what preceded the pattern. Default: 2.

Future Matched ZZ Count to Draw: How many ZigZag legs after the matched leg to show. A value of 2 means you see 2 swings of price behavior that followed the match historically — essentially showing you what happened next. Set to 0 if you want to avoid any "future" context from old data influencing your bias. Default: 2.



Understanding the "No Matches Found" Message

If the indicator cannot find any historical legs matching the current zone, it displays a small red label in the top-right corner of the subwindow:

No matches found (Max possible bars: 65000)

This does not necessarily mean something is wrong. A few things to check:

  • The current zone is unique. If price is in a territory it has rarely or never visited before (an all-time high or low region, for example), there genuinely may be no historical matches in the loaded data.
  • Not enough history loaded. The number shown is the maximum bars MetaTrader has available for that pair and timeframe. If it is low (a few hundred), go to Tools → History Center in MetaTrader 4 and download more history for that symbol.
  • ZigZag settings are too strict. If the ZZ Deviation is very high, the ZigZag will only flag very large swings, and it may be difficult to find an exact historical match. Try lowering the deviation slightly.
  • Lookback is too small. Increase the Lookback Bars setting to search further back in time.




Tips and Gotchas

  • History availability matters. When analyzing a pair different from your main chart, MetaTrader needs to have that pair's history files already downloaded. If you switch to a new symbol and the indicator immediately shows "No matches found" with a low bar count, just wait a few seconds for MetaTrader to load the data in the background, then switch timeframes or drag a new bar to trigger a recalculation.
  • Multiple instances and prefixes. Always use a unique prefix for each instance. The prefix is added to every chart object name, so without unique prefixes, two instances will overwrite each other's drawings.
  • Mirror objects and cross-pair subwindows. If your subwindow is tracking GBPUSD but your main chart is EURUSD, the mirror objects feature will be inactive. This is intentional — mirroring price-based lines between different pairs would place them at the wrong price levels on the main chart.
  • ZigZag is recalculated, not redrawn. The ZigZag used here is calculated internally every time the indicator runs. It is not the visual ZigZag indicator line you might see on your main chart. The internal settings (Depth, Deviation, Backstep) control what it detects, and these are separate from any ZigZag indicator you may have manually added elsewhere.
  • Shift Bar and subwindow width. If your matched segments are getting cut off at the right or left edge of the subwindow, try reducing Max Patterns or Spacing Bars, or scroll the chart left to give the subwindow more room.

Wrapping Up

"Last Time Here" is about one thing: giving you fast access to relevant historical context without interrupting your analysis workflow. Instead of manually scrolling through months of chart history and trying to recall what happened the last time price was in this zone, you get an instant visual replay of all the comparable moments — right there in a subwindow.

It works best as a confirmation tool alongside your existing edge. If you already have a reason to be bullish at a level, checking whether the historical matches also showed bullish continuation from that zone adds a layer of evidence. If the history is mixed or mostly bearish, that is worth knowing too.

Start with the default settings and a few thousand bars of lookback, then adjust the ZigZag parameters to match the type of swings you are interested in for your timeframe. Over time, you will develop a feel for which match counts and context depths give you the most useful signal for your particular style.