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
Body SR Levels
Confirms peaks and troughs on the next bar and builds levels from the candle bodies of 3 bars, including the bars before and after. Resistance is shown as reddish dots and support as blue dots, with up to the 4 nearest levels on each side.
Indicator name: Body SR LevelsMetaTrader 5Price chart
Confirm peak/trough → level from 3 bodies → shown as dots in order of nearness
Schematic diagram of how to read it. This is not an actual terminal screen.
1
Reddish dots are resistanceTomato dots are the maximum of the body tops of the 3 bars around a confirmed peak. They are not the wick high of the peak itself.
2
Blue dots are supportDodgerBlue dots are the minimum of the body bottoms of the 3 bars around a confirmed trough. They are not the wick low of the trough itself.
3
The ranking changes on each barUp to 4 each: resistance from lowest, support from highest. The dots are not connected diagonally; when the ranking changes, they switch to a different level.
Peaks and troughs confirmed with 1 bar on each sideUp to 4 levels shown on each sideClosed bars only by defaultMT5, 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
Number of bars to keep / Max Age (bars, 1 to 100000) InpMaxAge600 → 100
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 settingsInpMaxAge = 600
Defaults: Max Age=600, Max Distance=3%, Merge Distance=15 points, Closed Bars Only=true. Levels are shown by horizontal rows of reddish and blue dots.View the screen in detail at full size
Settings change exampleInpMaxAge = 100
Change example: only Max Age was changed from 600 to 100. This is an example in which old levels drop out sooner. On screen, blue levels such as those at the lower right have decreased. This is not a recommended value.View the screen in detail at full 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
Confirmed on the bar after the peak or trough
If the center high is greater than or equal to the highs before and after, it is a peak; if the low is less than or equal to the lows before and after, it is a trough. Equal highs and lows are also accepted. By default, output occurs after the next bar has closed.
The dot series is a price guide
It organizes past levels based on candle bodies. The appearance of dots is neither a guarantee of a rebound nor an order instruction.
Breakouts are not the only reason levels disappear
Levels drop out due to a body breaking through, bars elapsed, distance from the close, or cleanup by a new peak or trough. A level may also not be added because of the proximity check.
3
What it measures
Records the relationship between past peaks/troughs and candle bodies using only information that could be confirmed at that time. Output starts from closed bars.
Prices used for levels
The body top is the larger of the open and close, and the body bottom is the smaller. From the 3 bars (the one before the center, the center and the next), the maximum body top becomes resistance and the minimum body bottom becomes support.
Existing levels are cleaned up first
A resistance is removed when a body top strictly exceeds it, and a support when a body bottom is strictly below it. The distance and elapsed-bar limits are also checked at this stage.
Cleanup also on new peaks and troughs
Levels lower than the new resistance, or resistances derived from peaks lower than the new peak, are removed. Support is the reverse. It is not simply a process that deletes the oldest first.
Nearby levels are not added
If the difference between the new level and a level on the same side remaining after cleanup is less than Merge Distance, the new level is not added. The old price and age are kept; there is no averaging, moving or age update.
The 4 nearest are shown
Up to 20 candidates are held on each side, and the first 4 are shown, resistance from lowest and support from highest. The remaining candidates are kept even when hidden, and are shown if their ranking rises.
Bars on which dots are drawn
Drawing starts not from the center but from the next bar where confirmation occurred. Past dot series stay as they are, and each later bar shows the levels as of that time. The latest forming bar is empty by default.
4
Situations for reading the display
A new reddish dot series appeared
Indicator
The previous bar may have met the peak condition, and a resistance may have been created from the bodies.
Cross-check
Compare the body tops of the 3 bars around the center.
Check
The price differs from the tip of the peak's wick.
Caution
The dot series alone does not instruct a sell decision.
It remains even though a wick goes beyond it
Indicator
Deletion by breakout is judged on the body edge.
Cross-check
Compare the open/close with the dot price.
Check
Distinguish a wick-only breach from a body breach.
Caution
It can still disappear separately under the distance, elapsed-bar or new-peak conditions.
It disappeared even though the level was not broken
Indicator
Cleanup by age, distance or a new peak/trough may have taken effect.
Cross-check
Check Max Age, Max Distance and the most recent peaks and troughs.
Check
In some cases its display ranking simply dropped to 5th or lower.
Caution
Do not reinterpret a disappearance as a prediction of price direction.
Dots suddenly moved to a different price
Indicator
Numbers such as Resistance 1 are not numbers that track the same level; they are the ranking on that bar.
Cross-check
Also compare the other dot series of the same color.
Check
When nearby candidates are added or removed, the assignment of display slots changes.
Caution
It is not a line connecting dots diagonally.
Dots overlap at the same price
Indicator
With Merge Distance=0, the proximity check is never met, so candidates with equal values can also be added.
Cross-check
Check Merge Distance and whether peaks or troughs with equal values are continuing.
Check
Candidates at the same price may occupy several display slots.
Caution
Do not treat the number of overlaps as independent strong evidence.
5
Steps for checking the display
1
Apply with the defaults
Load sufficient history and check the display with Max Age=600, Max Distance=3, Merge Distance=15 and Closed Bars Only=true.
2
Compare bodies with levels
Look at the bodies of the 3 bars around the peak or trough and check at which price the reddish and blue dots are placed.
3
Compare by changing only the age
The published change example uses Max Age=100. Keeping the other conditions fixed makes the difference in the retention period easier to see.
4
Check the unit
Max Distance is a % of the close, and Merge Distance is in the symbol's points. Do not confuse bars, % and points.
6
Installation and checking the package contents
Included file
Purpose / location
TRI_Body_SR_Levels.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.
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 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.
Number of bars to keep
English item name
Max Age (bars, 1 to 100000)
Input name
InpMaxAge
Default
600
Allowed range
Integer 1 to 100000
Description
Default 600. Existing levels whose elapsed bars, counted from the center of the peak or trough, exceed this number are removed. It is not counted from the confirmation bar. A level is kept when the count equals the limit.
Distance from the close
English item name
Max Distance (percent of the close, 0.1 to 100)
Input name
InpMaxDistance
Default
3
Allowed range
0.1 to 100 (%)
Description
Default 3. An existing resistance is removed if it is higher than close×(1+ratio/100), and a support if it is lower than close×(1−ratio/100). The distance check for a newly created level starts from the next processed bar.
Width that suppresses adding nearby levels
English item name
Merge Distance (points, 0 to 100000)
Input name
InpMergePoints
Default
15
Allowed range
Integer 0 to 100000 (points)
Description
Default 15. The price width is the input value × the symbol's point. If a level on the same side remains whose difference is less than this width, the new level is not added. If the difference is exactly this width, it can be added. At 0, even equal values are not suppressed.
Judge closed bars only
English item name
Closed Bars Only
Input name
InpClosedBarsOnly
Default
true
Allowed range
true / false
Description
Default true. All 8 slots are empty on the forming bar. With false, the forming bar is also provisionally calculated, so the dots on that bar change or disappear. The provisional calculation does not directly change the state up to the closed bars.
Brand display and QR
English item name
Show Trilogy brand and QR code
Input name
InpTriBrandShow
Default
true
Allowed range
true / false
Description
Switches the brand text and QR display on or off.
Brand display position
English item name
Brand position (chart corner)
Input name
InpTriBrandCorner
Default
Bottom left
Allowed range
Top left / Bottom left / Bottom right / Top right
Description
Choose from the four corners of the chart.
Brand horizontal offset
English item name
Brand horizontal offset (pixels)
Input name
InpTriBrandX
Default
10
Allowed range
Integer. Limited to 0 to 4000 when displayed
Description
Adjusts the horizontal margin from the specified corner in pixels.
Brand vertical offset
English item name
Brand vertical offset (pixels)
Input name
InpTriBrandY
Default
10
Allowed range
Integer. Limited to 0 to 4000 when displayed
Description
Adjusts the vertical margin from the specified corner in pixels.
8
Usage specifications
Confirmed values with the same history and settings
Dots output on closed bars are not later moved to the center of peaks or troughs. Recalculating from the beginning after adding to or correcting the history, changing settings or reloading may change results.
Price digits and point
A point is the price increment the terminal defines for that symbol. If point=0.00001, 15 points=0.00015; if point=0.01, it is 0.15. There is no automatic conversion to pips or linkage to spread.
Dots and colors
Resistance is Tomato and support is DodgerBlue. Rank 1 is width 2 and the rest are width 1, with symbol 158. If it is hard to judge by color alone, also check whether the level is above or below the price and the level labels.
Functions not included
There are no notifications, automatic orders, selection of another timeframe, lines per placement location, start position determined by the number of screens, global variable settings or account authentication.
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
Not 4 levels on each side
Each side has up to 4. There are fewer when there are few candidates, when nearby ones are not added, or when they disappeared due to the age limit, distance or a breakout.
Nothing appears only on the latest bar
This is the default behavior with Closed Bars Only=true. It is shown after the next bar starts and the bar is processed as a closed bar.
Changing Max Age looks the same
If the levels on screen are within the retention period under both settings, there may be no visible difference.
Levels do not move after increasing Merge Distance
It is a condition for whether to add a level, not averaging or moving prices. Levels being held do not move.
A level farther than the distance appears temporarily
Deletion by distance is done before new candidates are added. Only on the bar where a level was added can it be outside the distance, and it is judged again on the next processed bar.
Settings do not load
Check the ranges: Max Age 1 to 100000, Max Distance 0.1 to 100, Merge Distance 0 to 100000.
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
For a center m in the time series, if high m is greater than or equal to the highs of m−1 and m+1, it is a peak; if low m is less than or equal to both neighbors, it is a trough. Bars that meet both at the same time are also accepted. Output starts from m+1. By default, it is calculated after m+1 has closed.
Order of deletion and addition
Breakout, distance and age of existing levels are checked first, followed by level cleanup by a new peak or trough, the proximity check, addition, and sorted display. If a nearby old candidate was removed first by the new peak/trough cleanup, the new candidate is added.
Boundaries and capacity
Breakout, distance and age delete a level when strictly exceeded and keep it when equal. Proximity means strictly less than the width. If 20 candidates remain on a side, no new candidate is added. Equal values can also be kept as separate candidates.
How the display works
This product is limited to the bodies of 3 bars and shows dots in order of nearness from the confirmation bar. It does not draw lines that extend body edges to later bars, or lines for each placement.
Published images and scope verified
The published images show the dot display. M1 is the timeframe display at the time the display examples were made, and the price data is mainly at 30-minute intervals. This does not mean the same frequency on actual 1-minute bars. The published images are screens from before the brand display was added. The on-screen display of the product with the brand display, symbols with a different number of price digits, and behavior over long histories have not yet been verified.