Read the time of a mark
Distinguish the bar that made the peak or trough from the bar where the mark appears. The mark did not announce the past high or low at that time.
After new highs or lows stop, confirms a turn from a bar count or a break of the close, together with a range condition. The price of the earlier extreme is shown on the bar where the turn was decided.
A red down arrow is a confirmed peakA Crimson mark is placed at the previous high's price on the bar that turned downward. It is not an instruction to sell on that bar.
A green up arrow is a confirmed troughA LimeGreen mark is placed at the previous low's price on the bar that turned upward. It is not necessarily the low of that bar.
The blue line connects confirmed pointsThe DodgerBlue zigzag connects confirmed points. No leg is drawn toward the latest unconfirmed extreme.
Compares the default settings and a settings change example on a screen with only this product applied.
This is an example for explaining the display. M1 on the screen is the timeframe display at the time the display examples were made and does not show the frequency of occurrence on actual 1-minute bars. The published images are screens from before the brand display was added. The calculation and drawing conditions are the same, and the included version has display settings for the brand text and QR. The settings change example is not a recommended value. Details can be checked in the actual-size display. Also check the price scale of the main chart and the positions of the candles.
Distinguish the bar that made the peak or trough from the bar where the mark appears. The mark did not announce the past high or low at that time.
Besides the count condition, the stall state, the range, and the high and low conditions of the turning bar are needed.
If the next turn is not confirmed, the line is not extended beyond the last point.
It measures stalls in new highs and lows and the turn conditions. It does not show future price movement or a win rate.
A stall is recognized on a bar whose high does not reach the reference high. When the count reaches 0, or the close falls below the reference low, the turn decision begins.
The direction turns downward when that bar's low is strictly below extreme − Size×point and that bar's high is also below the reference high. From falling to rising, the conditions are reversed.
The count returns to Min Bars when a new extreme is made. Equal values are not new extremes. When the decision begins, the stall flag is cleared, so it can differ from a simple consecutive bar counter.
When a turn is decided, the extreme price of the previous leg is placed on the turning bar. The drawing is shifted later in time; it is not a line that traces the candle highs and lows.
Size is in the symbol's point unit. 15 is not 15 pips.
Red is an earlier high and green is an earlier low. The horizontal position is the confirming bar.
For price movement after the last mark, no line appears until a new turn is decided.
The screen example with Min Bars 4 is for explanation. The same frequency of appearance does not necessarily occur on actual symbols and timeframes.
| Included file | Purpose / location |
|---|---|
| TRI_Stall_Reversal_ZigZag.ex5 | The MT5 main file. Place it in MQL5/Indicators. |
The ZIP contains only 1 item, the main file. The manual is opened from the product page on the site. Source code is not included. MT5 only; registration, account authentication and placing a license file are not required. Use it without changing the file name.
Extract the ex5 main file rather than leaving it in the compressed file.
In MT5, open MQL5/Indicators from 'File → Open Data Folder' and place the included ex5 there.
Refresh the Navigator or restart MT5, and apply it to the target chart. When comparing different settings, using separate charts makes checking easier.
First check with the default values. Changes and removal are done from the chart's 'Indicators List'.
Using this product does not require allowing DLLs. When removed, this product's drawings are cleared.
There are 7 inputs. Change them on the Inputs tab of the properties. The English item names and input names defined in the source are shown together.
InpMinBarsInpSizeInpClosedBarsOnlyInpTriBrandShowInpTriBrandCornerInpTriBrandXInpTriBrandYIn normal updates that process closed bars with the same inputs and the same history, the output of confirmed dots is not changed. Settings changes or reloading history trigger recalculation.
With Closed Bars Only=false, provisional marks may appear on the latest bar too. They may disappear as the high, low or close changes, so distinguish them from confirmed marks.
Looks for a direction using the high and low of the first bar as the reference. The first direction is decided when the high and low both rise or both fall. A turn mark does not appear merely because the first direction has been decided.
When a new dot is confirmed, a line is added between it and the previous dot. The dot output is not moved into the past, but interpolated lines between dots can appear later.
The display is a record of calculation results. It does not direct trading decisions and does not guarantee future price movements.
Check whether the initial direction is undecided, the turn conditions are not met, Size is large, or the history is insufficient.
The Min Bars count alone is not enough. Check new highs and lows and stalls, a break of the close, and the strict range and high/low conditions.
The price is an earlier extreme and the horizontal position is the bar that confirmed the turn, so they are displayed apart.
Adjust the vertical price scale and the display range. Do not judge results for the whole history from the marks at the edge of the published image alone.
If the first display does not appear, check history loading and the input ranges. If an earlier display has stopped updating, first check the price feed and the terminal's connection status.
If the current bar's high is below the reference high, the stall flag is set, and the count is decreased in that state. On a new high, the extreme and the reference high are updated and the count is reset. When the count is 0 or close < reference low, the stall flag is cleared, and then current bar low < extreme − Size×point and current bar high < reference high are evaluated. Note that the flag is cleared even if the range is not enough.
Updating an extreme means a strictly higher high or strictly lower low. Equal values do not update it. Right after the initial direction is decided, part of the reference high and low remains at the values of the first bar. Because the reference is updated by later strict new extremes and turns, only the first leg can differ from the usual description.
buffer 0/1 are the zigzag peaks/troughs and make up 1 DRAW_ZIGZAG. 2 is Confirmed Top (Crimson, symbol 234), 3 is Confirmed Bottom (LimeGreen, symbol 233). Empty values are EMPTY_VALUE. The direction alternates, and only confirmed points are drawn.
The published images and numbers were checked on the product before the brand display was added. For the product with the brand display, we confirmed that the calculation part is the same, but the on-screen display has not yet been verified. Intermediate calculation values, the subwindow name and Data Window display, and behavior with long history or symbols with different price digits have not been verified.