MT5 indicators← Sloped Fractal Levels product page日本語の取扱説明書

This product is in preparation for release. Product files are not yet distributed; the manual is published so that you can review its content. This manual is an English translation of the Japanese manual. Images (screens and figures) are not translated and may contain Japanese text or earlier names.

For Trilogy users

Sloped Fractal Levels

Draws price levels that extend at a fixed slope from peaks and troughs confirmed by the bars on the left and right. The points of the 3 levels above and below nearest the close, and the arrows on the confirming bars, show the position relative to price.

Indicator name: Sloped Fractal LevelsMetaTrader 5Price chart

Arrow = 'confirming bar', point = 'level at that time'

The trough price is used after F bars on the right have confirmed itBar where the trough formedConfirmed barAlready risen by the time of confirmationLevels are not drawn back to the left of the arrow.
Schematic diagram of how to read it. This is not an actual terminal screen.
1

The horizontal position of an arrow is the confirming barAfter waiting for Fractal Bars bars on the right, the indicator places a LimeGreen arrow for a trough and a DarkOrange arrow for a peak. The price is an earlier extreme, so it is not necessarily the high or low of the arrow's bar.

2

The point color is its position relative to the closeCrimson is a level above the close, and SeaGreen is a level at or below the close. It does not mean that levels starting from a peak are always red and those from a trough are always green.

3

Levels above and below slope in the same directionIf Slope is positive, levels starting from either a peak or a trough rise with every 1 bar. At 0 they are horizontal. The slope is not a value obtained automatically from the market.

Confirmed with 7 bars on each side3 levels each above and belowDefault is closed bars onlyMT5, no account authentication
1

MT5 display and examples of changed settings

Compares the default settings and a settings change example on a screen with only this product applied.

Settings change example: these items are changed
Merge and break width / Gap (points, 0 to 10000)
InpGap
10 → 30
Rise per 1 bar / Slope (points per bar, 0 to 1000)
InpSlope
0.3 → 0

All other inputs remain at their defaults. On a PC, the default is on the left and the change example on the right; at smartphone width they appear in the same order from top to bottom.

Default settingsInpGap = 10 / InpSlope = 0.3
Sloped Fractal Levels default settings
Defaults: 7 bars on each side, Gap 10 point, Slope 0.3 point/bar, Life 200 bars. The rows of dots rise gradually, and the arrows are placed at the confirmation time of peaks and troughs. In places, the upper levels are outside the displayed range.
View the screen in detail at full size
Sloped Fractal Levels default settings (actual size)
Settings change exampleInpGap = 30 / InpSlope = 0
Sloped Fractal Levels settings change example
Change example: Gap changed from 10 to 30 and Slope from 0.3 to 0. The rows of points become horizontal. Because Gap was also changed, the conditions for merging and ending levels also differ from the default.
View the screen in detail at full size
Sloped Fractal Levels settings change example (actual size)

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.

2

How to read it in 30 seconds

An arrow is not an order signal

It is a record of the time when a peak or trough could be confirmed. It does not instruct a trade in the direction the arrow points.

Look at the nearby levels above and below

Shows 3 levels each in order of nearness to the close. Distant levels that are not shown may remain internally.

Separate the reasons a line disappeared

Distinguish lifetime, a break-and-return move, replacement of an extreme, and a change in display rank. A point that is no longer visible does not by itself establish that the level has ended.

3

What it measures

It measures levels extended at a fixed slope from confirmed extremes, and their position relative to the close at that time.

Confirm peaks and troughs

Compares the F bars on each side of the center bar. The low may be equal to the older side but must be strictly lower than the newer side. The high is the reverse.

Adopting and replacing extremes

Internally, peaks and troughs are adopted alternately. However, a further extreme on the same side is adopted as a replacement, so arrows in the same direction may appear in a row on screen. Earlier confirmed arrows are not deleted.

Level formula

Extreme price + number of bars elapsed since the extreme's bar × Slope × point. Because the display starts from the confirming bar, the price of the first point can differ from the extreme price of the arrow.

Merge with nearby extremes

Among the levels alive at the time of confirmation, the new extreme is merged into the oldest level whose price at the extreme's bar is less than Gap away. The type (peak or trough) does not matter, and no new level is created. The confirmation count is kept only internally.

4

Situations for reading the display

Price approaches a level

Indicator
The points above and below are candidate levels near the close.
Cross-check
Compare the high, low and close of the candles with the positions of the points.
Check
Read approaches, crossings and moves away as records.
Caution
It does not predict a rebound or continuation after a breakout.

A level's color changes

Indicator
Even for the same level, the display color changes when the close moves above or below it.
Cross-check
Look at the level's slope and the price position separately.
Check
Read the color as the current above/below relationship.
Caution
Do not conclude a support/resistance role reversal or a trade from the color alone.

A row of points breaks off

Indicator
There are levels that ended, levels that dropped out of the display rank, and levels removed by replacement.
Cross-check
Check the switching of the 3 nearest levels and Life.
Check
Do not read every break uniformly as 'broke through and came back'.
Caution
Lifetime is counted from the extreme's bar, not from the confirming bar.

Set the slope to 0

Indicator
With Slope=0, the levels are horizontal.
Cross-check
Look at before and after the change on the same price history.
Check
This is a display setting for when you want to compare them as horizontal levels.
Caution
If the timeframe or digits differ, the same Gap and Slope mean a different price width.

Use the latest bar

Indicator
With Closed Bars Only=false, output is also made on the forming bar.
Cross-check
Distinguish the display before and after the bar closes.
Check
Treat arrows and points on the forming bar as provisional values.
Caution
Before the bar closes, values change, and they appear and disappear.
5

Steps for checking the display

1

Check the default display

Start with 7 bars on each side, Gap 10, Slope 0.3, Life 200 and Closed Bars Only=true.

2

Separate the arrow's time and price

It is a record confirmed when the arrow's bar closed. That display could not be known at the bar of the earlier peak or trough.

3

Look at points in order of nearness to the close

3 each above and below, up to 6 in total. Upper points are Crimson, and lower ones (including equal) are SeaGreen.

4

Compare one setting at a time

Gap is the merge width and end condition, Slope is the slope, and Life is the lifetime. When comparing, keep the timeframe, history and other inputs the same.

6

Installation and checking the package contents

Included filePurpose / location
TRI_Sloped_Fractal_Levels.ex5The 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.

1

Extract the ZIP

Extract the ex5 main file rather than leaving it in the compressed file.

2

Open the data folder

In MT5, open MQL5/Indicators from 'File → Open Data Folder' and place the included ex5 there.

3

Apply this product

Refresh the Navigator or restart MT5, and apply it to the target chart. When comparing different settings, using separate charts makes checking easier.

4

Check the settings and display

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.

7

Settings

There are 9 inputs. Change them on the Inputs tab of the properties. The English item names defined in the source are shown together with the input names.

Confirmation bars on each side

English item name
Fractal Bars On Each Side (1 to 50)
Input name
InpBars
Default
7
Allowed range
Integer from 1 to 50
Description
Default 7. The number of bars on each side. The first candidate confirmation needs 2F+1 bars; by default, a decision can be made after the 15th bar closes.

Merge and break width

English item name
Gap (points, 0 to 10000)
Input name
InpGap
Default
10
Allowed range
Integer from 0 to 10000 (points)
Description
Default 10. Merging occurs when the difference is less than Gap; a break and return occurs when the move strictly exceeds 2×Gap. At 0, no merging occurs. A point is the price unit of the symbol and is not the same as a pip.

Rise per 1 bar

English item name
Slope (points per bar, 0 to 1000)
Input name
InpSlope
Default
0.3
Allowed range
Finite value from 0 to 1000 (points per bar)
Description
Default 0.3. Added to levels from both peaks and troughs. 0 is horizontal; negative numbers are not accepted. It is calculated by the number of bars, not by length of time.

Level lifetime

English item name
Level Life (bars, 1 to 10000)
Input name
InpLife
Default
200
Allowed range
Integer from 1 to 10000 (bars)
Description
Default 200. Counted with the extreme's bar as the origin. It can be extended by merging, and it does not mean the level is always shown for 200 bars from the confirming bar.

Closed bars only

English item name
Closed Bars Only
Input name
InpClosedBarsOnly
Default
true
Allowed range
true / false
Description
Default true. The latest forming bar is empty. With false, the latest bar is also calculated, but that provisional state is not reflected in the saved state of closed bars.

Brand and QR display

English item name
Show Trilogy brand and QR code
Input name
InpTriBrandShow
Default
true
Allowed range
true / false
Description
Default true. Turns the brand text and QR display on or off. The calculation conditions do not change.

Brand reference corner

English item name
Brand position (chart corner)
Input name
InpTriBrandCorner
Default
Bottom left
Allowed range
Top left, bottom left, bottom right, top right
Description
Default is bottom left. The anchor corner of the brand.

Brand horizontal margin

English item name
Brand horizontal offset (pixels)
Input name
InpTriBrandX
Default
10
Allowed range
Integer (limited to 0 to 4000 pixels when displayed)
Description
Default 10 pixels. Horizontal margin from the reference corner.

Brand vertical margin

English item name
Brand vertical offset (pixels)
Input name
InpTriBrandY
Default
10
Allowed range
Integer (limited to 0 to 4000 pixels when displayed)
Description
Default 10 pixels. Vertical margin from the reference corner.
8

Usage specifications

Conditions for a level to end

For a trough-derived level, it ends when, after the low goes below the level −2×Gap, the high of a different bar returns above the level +2×Gap. For a peak-derived level, it is the reverse. Highs and lows, not closes, are used for the evaluation. The first break and the return are not allowed to occur on the same bar.

Lifetime and replacement

The bar at the end of the lifetime is included, and the level is removed on the next bar. When a further-out extreme in the same direction is adopted, levels newly created by the previous extreme are removed from then on. If it was a confirmation of an existing level, only the confirmation count is reverted; the already extended lifetime is not reverted.

Past records and recalculation

When closed bars are updated normally with the same inputs and history, past arrows and dots are not deleted afterward. In a full recalculation due to settings or timeframe changes or additions to or corrections of the history, the display may change.

Drawing and internal limit

Internal levels are up to 100 in total. When full, new levels are not created, and old ones are not automatically pushed out. The display shows the 3 nearest above and the 3 nearest below; there is no function to show the confirmation count as line thickness, and no zigzag line.

For on-screen display only

The display is a record of calculation results. It does not direct trading decisions and does not guarantee future price movements.

9

Troubleshooting and usage notes

Only an arrow appears, with no points

This happens when the new level ends by lifetime or a break and return before confirmation, when it is merged, or when there are 100 levels internally. Arrows and new levels are not necessarily 1 to 1.

Arrows in the same direction continue

It is a record of a replacement that adopted a further extreme. The internal representative extreme changes, but the earlier confirmed arrows remain.

The position or color of points jumps

On each bar, levels are re-sorted in order of nearness to the close. Upper 1 and the others are not fixed IDs of specific levels. When the display rank or the above/below relationship changes, the rows of points switch.

Arrows or points are off screen

Arrows are placed at earlier extreme prices. Levels that live long can slope off screen. Adjust the price scale and vertical scaling.

Inputs are not accepted

Check the ranges of the bars on each side, Gap, Slope and Life. Slope does not accept negative numbers or non-finite values.

Want it horizontal / values do not change with the timeframe

Set Slope=0. There is no function that automatically changes Gap or Slope for each timeframe; the input values are used as they are.

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.

10

Technical information and specification details

Candidate, confirmation and output

Let the oldest bar be 0, the confirming bar t, F = bars on each side, and the center m=t−F. The candidate is confirmed when t≥2F. For a low, the condition is at or below the older F bars and strictly lower than the newer F bars; for a high, the reverse. If a trough is adopted on a bar, no peak is adopted on the same bar. With the default true, output is made after t closes. With false, the latest bar is provisional.

Timing of merging

Levels that ended by the survival check are removed first, then the extreme is adopted and merged. It is merged into the oldest surviving level whose origin is before m and whose price difference at m is less than Gap. Ended levels are never revived. The extended expiry is max(previous expiry, m+Life).

History check of a new level

When a level is created, lifetime, break and return are checked in order from the bar after the extreme to the confirming bar. If it ended during that time, no points are started. Points are never drawn back into the past.

Output mapping

0 to 2 = Upper Level 1 to 3, 3 to 5 = Lower Level 1 to 3 (symbol 158). Upper 1 and Lower 1 are width 2; the other levels are width 1. 6 = Low Extreme (LimeGreen, 233), 7 = High Extreme (DarkOrange, 234); arrows are width 2. Empty values are EMPTY_VALUE.

Verified scope

The published images and numbers were checked by feeding fixed price data to 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 level values, the subwindow name and Data Window display, and behavior with long history or symbols with different price digits have not been verified.