On this page
What TD Sequential Ultimate shows
TD Sequential Ultimate counts price conditions associated with possible trend exhaustion. A Buy Setup develops during weakness; a Sell Setup develops during strength. Those names identify counting directions, not executable buy/sell instructions. The indicator displays Setup numbers, Countdown numbers, perfection arrows and TDST support/resistance. It does not place orders.
ForexBestRobots edition 1.04 is a marked derivative of EarnForex 1.03 under Apache 2.0. It fixes MaxBars=0, MT4 buffer indexing, canceled-sequence buffers and chart-object ownership. It adds silent history rebuilding and notification guards while retaining the source’s core comparisons. This is not an official DeMark product or a complete implementation of every DeMark variation.
Counting rules and five buffers
Using chronological candle k, a Buy Setup begins after a flip: C[k-1]≥C[k-5] and C[k]<C[k-4]. A Sell Setup reverses the inequalities. Nine consecutive qualifying closes complete the Setup; equality breaks an incomplete Setup. A new flip can start another Setup after 9.
A Buy Countdown can start on Setup 9 and counts closes C[k]≤L[k-2]; a Sell Countdown uses C[k]≥H[k-2]. Qualifying candles need not be consecutive. At count 12, Buy 13 additionally requires L[k] below the close of Countdown 8; Sell 13 requires H[k] above that close. These extra comparisons are strict. A failed attempt displays +, encoded as +14 or -14 in buffer 3, while the internal count remains 12.
Buy perfection requires candle 8, 9 or a later candle to have a low strictly below both Setup 6 and 7; Sell perfection uses highs strictly above both. The code checks candle 8 only when 9 completes, so its arrow is placed retrospectively. TDST resistance comes from a completed Buy Setup’s highest high, or the preceding close if higher; support mirrors this for a Sell Setup. A close beyond a level ends it. Levels may be backfilled toward their originating candle after 9.
An opposite completed Setup cancels the active Countdown. Another cancellation occurs when the whole Buy candle lies above its Setup resistance and the prior close is above it; reverse this for Sell. The marked edition removes canceled labels and their matching signed buffer entries. Completed 13 sequences are preserved. Buffer signs are counting directions, not the candle’s color.
Buy: C[k] < C[k-4] × 9 Sell: C[k] > C[k-4] × 9 Buy CD: C[k] <= L[k-2] Sell CD: C[k] >= H[k-2] Setup: +1..+9 / -1..-9 Countdown: ±1..±13; ±14 = + shift 0: no result
| Buffer | Output | Empty | Meaning |
|---|---|---|---|
| 0 | Price | EMPTY_VALUE | TDST resistance |
| 1 | Price | EMPTY_VALUE | TDST support |
| 2 | +1…+9 / -1…-9 | 0 | Buy / Sell Setup |
| 3 | ±1…±13; ±14 | 0 | Countdown; ±14 displays + |
| 4 | +1 / -1 | 0 | Buy / Sell perfection |
Real EUR/USD examples
The charts reconstruct archived Yahoo Finance EUR/USD H1 OHLC rounded to five decimals. Colors and layout illustrate the calculations; they are not MetaTrader screenshots, actual notification logs or profit tests. CSV includes the complete bounded calculation input, raw quotes, normalized quotes, buffer values and the current opening. Times are UTC; the program uses broker time.
The 3 June 2025 example shows Buy Setup 9 on the 15:00 candle, observable at the 16:00 opening. Perfection is drawn on candle 8 at 14:00, but was only confirmed at 16:00. An arrow’s source timestamp must not be mistaken for its availability time.
The 19 June example shows non-consecutive Buy Countdown counts ending at 13 on 15:00, observable at 16:00. The May example compares a failed Buy 13 attempt (+, buffer 14) on 9 May at 21:00 with valid 13 on 11 May at 23:00, observable on 12 May at 00:00. Weekend gaps use the next available source opening, not an assumed hourly quote.



Timeframe, history and observation time
The program uses the current chart symbol/timeframe, without MTF projection. H1 examples apply to hourly candles only. The four-bar and two-bar comparisons count available source bars, not elapsed clock hours. Broker sessions, Sunday candles, precision and history depth can change counts.
MaxBars defaults to 1000 closed positions, with up to five earlier context bars; 0 uses all loaded calculable history. At least seven loaded bars are needed. A finite starting window can omit an earlier flip or unfinished Countdown, so 1000 and 0 can disagree. No bars are downloaded automatically.
Settings and defaults
All 16 inputs are listed below. Valid ranges: MaxBars 0–1000000, FontSize 6–48, ArrowWidth 1–5 and PixelDistance 0–100. FontFace accepts 1–80 characters. Prefix accepts 1–20 ASCII letters, digits, underscores or hyphens; use a different value for each copy on the same chart.
The internal FBR namespace separates objects from the original indicator and from other prefixes. A duplicate FBR chart/prefix is rejected without cleaning the first copy. Defaults retain lime Buy, red Sell and orange Countdown labels. The two TDST buffer plots retain their original red/green colors.
| Input | Default | Practical meaning |
|---|---|---|
MaxBars | 1000 | Closed positions to calculate: 1000; 0 means all; maximum 1000000. |
BuySetupColor | clrLime | Buy Setup and perfection color; lime. |
SellSetupColor | clrRed | Sell Setup and perfection color; red. |
CountdownColor | clrOrange | Countdown label color; orange. |
FontFace | "Verdana" | Count font; 1–80 characters. |
FontSize | 12 | Count font size; 6–48, initially 12. |
ArrowWidth | 2 | Perfection-arrow width; 1–5, initially 2. |
PixelDistance | 3 | Vertical spacing in pixels; 0–100, initially 3. |
Prefix | "TDS_" | Unique per-chart prefix; 1–20 ASCII letters/digits/_/-. |
AlertOnSetup | false | Enable events when Setup 9 completes. |
AlertOnPerfecting | false | Enable events when perfection is confirmed, including a backstamp on 8. |
AlertOnCountdown13 | false | Enable events for valid Countdown 13; not a failed +. |
AlertOnSupportResistance | false | Enable events when a closed candle passes TDST support/resistance. |
AlertNative | false | Deliver eligible events through terminal popups. |
AlertEmail | false | Deliver eligible events by configured email. |
AlertNotification | false | Deliver eligible events through configured push notifications. |
Alerts and chart labels
All four event switches and all three delivery switches default to false. Enable both a relevant event and at least one delivery channel. Popup, email and push are supported; push/email require configured, online desktop MetaTrader. There is no separate WAV input or mobile-only custom-indicator installation.
Initial attachment, explicit history reset and history-size-only rebuilding are silent. On a new opening, only events generated while processing the newest closed candle are eligible; a perfection arrow can refer back to shift 2. Each event type is attempted at most once per opening. Failed delivery is not retried every tick, and missed historical events are not queued.
The bounded history is rebuilt on a new opening, reset or history-size change, rather than on every tick. Chart changes and keyboard/click events reposition visible labels with guarded coordinates. This edition has no Pause/Clear panel. Removing the indicator removes its own objects.
Install and compile the source
- Extract the ZIP for your platform.
- In desktop MetaTrader open File → Open Data Folder, then MQL4 or MQL5.
- Copy the ZIP’s Indicators folder there; keep upstream separately as the original reference.
- Open TD_Sequential_Ultimate_ForexBestRobots.mq4 or .mq5 in the matching MetaEditor, press F7 and inspect errors/warnings.
- Refresh Navigator → Indicators and attach to a demo chart with a unique Prefix.
- Check Setup/Countdown values, retrospective arrows, TDST and MaxBars with alerts off before configuring delivery channels.
The ZIP contains MQ4/MQ5 source without ready EX4/EX5 files. Native compilation and runtime have not been verified. Copy only our Indicators folder for normal installation; upstream contains the unchanged original for reference.
Download TD Sequential Ultimate free
Both platform packages are hosted on this site. Each includes marked self-contained source, the unchanged platform original, README, Apache 2.0, change notes, a textual patch, checksums and installation notes in all 12 languages. No external include or DLL is required.
Compile with F7 in the matching desktop MetaEditor, inspect diagnostics and test on a demo chart. External C++/Python checks do not establish native compilation, terminal rendering, broker-history behavior or actual notification delivery.
Free source ZIP · ForexBestRobots edition 1.04 · Compile in MetaEditor
Limits and retrospective changes
A 9, 13, + or perfection arrow does not measure reversal probability. A strong trend can continue after a completed count. There is no entry/exit plan, position sizing, spread, commission or slippage model in these examples.
Historical output can change: incomplete Setups and canceled Countdowns are removed, perfection can be stamped back on candle 8, and TDST levels are backfilled after Setup 9. The calculation window and feed corrections also matter. Closed-candle processing does not make every historical mark available at its plotted timestamp.
A non-finite price, invalid OHLC bounds or unordered/nonpositive time in the required closed history clears this instance’s output until valid data returns. The current candle is excluded. A large all-history scan may create many objects and be slower; unavailable chart coordinates leave the prior label position unchanged.
Frequently asked questions
Does Setup 9 mean buy or sell immediately?
No. Buy/Sell describes the direction of the count. A completed Setup is not a complete trade rule or a reversal guarantee.
Must Countdown candles be consecutive?
No. Candles that fail the two-bar comparison do not increment the active count. Cancellation rules still apply.
What does + mean?
The candidate 13 passed the normal Countdown test but failed the extra strict test against Countdown 8. Buffer 3 stores +14 for Buy or -14 for Sell; the count remains 12.
Why is perfection on candle 8 visible later?
The code checks candle 8 only after Setup 9 completes. Its plotted time is earlier than its confirmation and possible notification.
Does MaxBars=0 really calculate all history?
Yes in this marked edition: all loaded positions with five older context bars. The pinned original applied a zero limit; this is corrected.
When are notifications sent?
Only eligible new-opening events from the newest closed candle; initial/reset scans are silent. Each type is attempted once per opening.
Are the downloads compiled and tested inside MetaTrader?
No. They contain source for desktop MetaEditor. Native compilation, display and delivery remain to be verified on a demo terminal.
Sources and verification scope
The review follows the pinned EarnForex code and the marked changes, not a claim to certify proprietary rules. Original credit and Apache 2.0 are retained; no NOTICE exists in the pinned repository. Inclusion does not imply endorsement by EarnForex or DeMark.