Red and blue
Crimson is the supply line and DodgerBlue the demand line. They are not smooth continuous lines but series of small dots placed at each bar's price.
Draws lines from pairs of confirmed highs and lows, and shows the position where the close first crossed a line and a calculated target level.
Look at the lines firstRed is the supply line and blue the demand line. After a peak or trough candidate is confirmed, they are updated with the new pair.
Compare the close with the marksThe green up arrow is the first bar that closed above the supply line, and the orange-red down arrow the first bar that closed below the demand line.
Targets are reference levelsThe gold and purple dot series are levels calculated from past ranges, not forecasts of being reached or instructions to take profit.
Compares the default settings and a settings change example on a screen with only this product applied.
Example shown: M1. This is an example for explaining the display. The published images are screens from before the brand display was added. The calculation and drawing conditions are the same, and the packaged version has display settings for the brand text and the QR code. The settings change example is not a recommended value. Details can be checked in the full-size view. Please also check the price scale of the main chart and the positions of the candlesticks.
Crimson is the supply line and DodgerBlue the demand line. They are not smooth continuous lines but series of small dots placed at each bar's price.
Breaks above are LimeGreen and breaks below OrangeRed. Arrows are placed at that bar's line price, not at the high or low.
Within the same pair of points, a mark is placed only on the first break. It is not repeated even if price crosses the line again.
Measures the order of the swing points' highs and lows and the position of the close relative to the sloped lines extended from them. It is not a function that predicts future price movement.
Joins the newest confirmed swing high point with the newest of the older swing high points whose price is strictly higher, and extends the line forward. It does not unconditionally select the previous point.
Uses the newest confirmed swing low point and the newest older swing low point whose price is strictly lower. If there is no suitable partner, that side's line is empty.
Classic and Equal Tops are confirmed after the bar 1 bar after the candidate center closes, and Level and Strict after the bar N bars after closes. A point is adopted for the line from the bar after that. Lines and arrows are not added back to the candidate center.
Calculated on the break bar, and the same level is kept while the line stays the same. When a new swing point is confirmed and the pair changes, the broken state and the target are reset.
Check the candles, price scale and red and blue dot series on the same chart.
Check whether it is Classic, Equal Tops which allows runs of equal values, or Level / Strict which use N bars.
It waits 1 or N bars from the candidate center, and the line changes from the bar after the confirming bar closes.
Compare the line price with the close. To avoid the provisional display on the forming bar, keep Closed Bars Only=true.
A calculated level found from the distance between past lines and prices. Keep checks of operation and display separate from trading decisions.
| Included file | Purpose / location |
|---|---|
| W2C_Confirmed_Swing_Lines_and_Targets.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 8 inputs. Change them on the Inputs tab of the properties. The English item names and input names defined in the source are shown together.
InpRuleInpBarsInpTargetsInpClosedBarsOnlyInpTriBrandShowInpTriBrandCornerInpTriBrandXInpTriBrandYThe pair of dots for a line is decided with confirmed data up to before that bar opens. The default break evaluation is made after that bar closes. Read these two time points separately.
On the bar where a new line starts to be used, if the close is already outside the line, the first mark appears. It does not require the previous bar to have been inside the line.
Recalculating after adding to or correcting the history, changing the start position or changing settings may change past display. Distinguish this from adding subsequent bars to the same history.
There are no notifications, emails, automated trading or position management. There are also no arrows pointing at the swing points themselves as peaks or troughs. It is for displaying each line and the breaks and targets.
The display is a record of calculation results. It does not direct trading decisions and does not guarantee future price movements.
The number of bars needed for confirmation and the price relationship of the 2 points may not yet be in place. Especially at the start of the history or with a large N, the line is empty until a partner point is found.
Bars On Each Side must be 1 to 20 for every rule. Out of range, loading is refused. Check the explanation starting with Confirmed Swing Lines and Targets: in the log.
Show Targets may be false, the current line may not yet have been broken, or it may have been reset by a new swing point. Also check the price scale and levels outside the screen.
This is normal with Closed Bars Only=true. Even if there is a line and a target continuing from the past, a new break waits for the bar to close.
Change the width or zoom, and also check the actual-size image. The lines are series of small dots; tell them apart by price and section, not only by color.
Adjust the corner position and margin of the brand, or set Show Trilogy brand and QR code to false. The calculation does not change.
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.
On the high side, Classic is H[c]>H[c−1], H[c]>H[c+1], H[c]>C[c−2]. Equal Tops is H[c]>H[c+1], with the bar after a run of 0 to 3 equal values on the older side being lower. Level N is N bars on the older side at or below H[c] and N bars on the newer side below H[c]. Strict N is N bars on both sides below H[c]. For lows, the comparisons are reversed.
With the older point a, the newer point b and the current bar t, the high-side supply line is H[a]+(H[b]−H[a])×(t−a)/(b−a). The demand line is calculated the same way with lows. It interpolates by bar number, not by elapsed seconds.
On the bar t of a break above, the bar i with the lowest low from the bar after the older high point a up to t is selected, and supply line[t]+supply line[i]−low[i] is the target. For a break below, the bar i with the highest high from the bar after the older low point up to t is selected, giving demand line[t]+demand line[i]−high[i]. For equal extremes, the newest bar is selected. The break bar itself is included in the range.
6 series: Supply Line, Demand Line, Break Above Supply, Break Below Demand, Target Above and Target Below. They are calculated levels, not actual trading instructions or results.