DeMark TDST Support And Resistance
TD Setup numbers a run of 9 bars, but the number itself is only half the tool: DeMark uses the completed Setup to define a price level, the TDST line, and treats a close beyond that line as evidence the Setup's directional read failed. Per the commonly published definition this submission follows, the TDST support level from a Buy Setup is the higher of the highs of the setup's first two bars; the TDST resistance level from a Sell Setup is the lower of the lows of its first two bars. Both are drawn as a horizontal ray from the setup's completion bar forward. This file detects Setups itself with the same close-vs-close-4-bars-back rule as the TD Sequential Counter submission in this catalogue, rather than depending on it - every CodeBase download has to work as a single self-contained file. If you already run the Counter for the 1-9/1-13 numbering, this adds the price levels that give those numbers their practical meaning: where the setup's premise actually gets falsified. A broken level does not disappear - it switches to a dotted line so you can still see where a prior setup's support or resistance used to matter, without it competing visually with the still-live levels. Notes and limitations - Setup detection duplicates the TD Sequential Counter's core rule but does not implement Countdown or any numbering - this file only draws price levels. - The TDST definition used here (highest high / lowest low of the setup's first two bars) is the version most consistently published across public DeMark references; some sources describe minor variants. Treat the exact level as a close approximation of DeMark's own charting software, not a certified match. - A very long loaded history triggers a one-off full recount on chart open, same as the Counter submission. - Fully causal: levels are only added and only marked broken on a closed bar, never on bar 0, so nothing here repaints.
Indicator · MT5 · v1.0 · Free
About DeMark TDST Support And Resistance
DeMark TDST Support And Resistance is an indicator for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 5 settings, such as Support color, Resist color and Line width. MQL source code included.
Files in the download: DemarkTdstLevels.ex5, DemarkTdstLevels.mq5, DemarkTdstLevels.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Support color | clrLime | Buy Setup TDST (support) line colour |
| Resist color | clrRed | Sell Setup TDST (resistance) line colour |
| Line width | 1 | Line width |
| Max levels | 6 | Lines kept per side (oldest dropped first) |
| Alerts | true | Alert when a closed bar breaks a TDST level |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: Support & Resistance · Alerts · MT5 Indicator · MQL5 Source Code