MT5 indicators← Turtle Entry Exit Marks 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

Turtle Entry Exit Marks

Shows arrows when price goes beyond a past high or low and enters a calculated buy or sell state, and dots when it leaves that state. It is not linked to an actual account or open orders.

Indicator name: Turtle Entry Exit MarksMetaTrader 5Main chart

How to read the display

1Green and red arrows record entries2Blue and orange dots record exits3On the same bar, exits are checked first
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Green and red arrows record entriesA green up arrow marks a bar that entered the buy state; a red down arrow, a bar that entered the sell state. Buy and sell are managed separately.

2

Blue and orange dots record exitsA blue dot marks a bar that left the buy state; an orange dot, a bar that left the sell state. No exit dot is placed for a direction that has not been entered.

3

On the same bar, exits are checked firstIf an entry occurs again after an exit, a dot and an arrow overlap on the same bar. The state is a calculated record, not actual trading.

Record of conditions metMT5 onlyNot a trading instruction
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
Preceding bars used for entry / Trade Period
InpTradePeriod
20 → 10
Preceding bars used for range-based exits / Stop Period
InpStopPeriod
10 → 5
ATR multiplier for the fixed stop / ATR Factor
InpATRFactor
2 → 1

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 settingsInpTradePeriod = 20 / InpStopPeriod = 10 / InpATRFactor = 2
Turtle Entry Exit Marks default settings
Default Trade Period=20, Stop Period=10, ATR Factor=2. Green and red arrows record entries, and blue and orange dots record exits. They do not represent actual orders or closings.
View the screen in detail at full size
Turtle Entry Exit Marks default settings (full size)
Settings change exampleInpTradePeriod = 10 / InpStopPeriod = 5 / InpATRFactor = 1
Turtle Entry Exit Marks settings change example
Trade Period=10, Stop Period=5, ATR Factor=1. A comparison with 3 items changed. Because both the entry and exit conditions change, it does not show the effect of each setting or recommended values.
View the screen in detail at full size
Turtle Entry Exit Marks settings change example (full size)

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.

2

How to read it in 30 seconds

Green and red arrows record entries

A green up arrow marks a bar that entered the buy state; a red down arrow, a bar that entered the sell state. Buy and sell are managed separately.

Blue and orange dots record exits

A blue dot marks a bar that left the buy state; an orange dot, a bar that left the sell state. No exit dot is placed for a direction that has not been entered.

On the same bar, exits are checked first

If an entry occurs again after an exit, a dot and an arrow overlap on the same bar. The state is a calculated record, not actual trading.

3

What it measures

Shows arrows when price goes beyond a past high or low and enters a calculated buy or sell state, and dots when it leaves that state. It is not linked to an actual account or open orders.

How the calculation works

The entry reference is the highest high RH and lowest low RL of the preceding Trade Period bars, excluding the current bar. When not in the buy state, close>RH enters the buy state; when not in the sell state, close<RL enters the sell state. With Strict Entry=true, high>RH / low<RL are also added as conditions. The entry value is that bar's close (the same for entries by the high or low). The exit references SH and SL are the highest high and lowest low of the preceding Stop Period bars, excluding the current bar. In the buy state, close<SL exits; in the sell state, close>SH exits. With Strict Exit=true, low<SL / high>SH are also checked. The additional conditions for Greedy=true and the ATR stop are described below. A value equal to the reference does not meet the condition.

Conditions and exceptions

Each time, it recalculates the entire loaded history from the oldest side, and at the start neither buy nor sell is entered. Judgment starts from max(Trade Period, Stop Period, ATR Period−1) in 0-based bar numbering. With Closed Bars Only=true, the latest forming bar is not judged, and calculation goes up to the bar 1 before it. If history is insufficient or conditions are not met, no marks appear. Because past states are carried over, marks may change with the history start position, additions or corrections.

Fixed ATR stop

The true range TR is max(current high, previous close)−min(current low, previous close); only the first bar of the history uses high−low. ATR is the simple average of TR over ATR Period bars including the current bar. The buy stop is fixed at the entry bar's close−ATR×ATR Factor and the sell stop at close+ATR×ATR Factor; they do not trail afterward. With Evaluate Stop=true, a buy exits when the close falls below the stop and a sell when the close rises above it. With Strict Stop=true, the low for buys / the high for sells is also checked. It is not affected by whether Greedy is set. On a bar that has just entered, the stop check for that entry is not yet performed.

Additional condition for Greedy

Greedy=true adds a condition only to range-based exits. For buys, an exit by the close requires close>entry value, and an exit by the low requires low>entry value. For sells, close<entry value and high<entry value are required respectively. It is not a function that exits simply on reaching the favorable side; a break of the Stop Period range is also required. It does not calculate actual profit or loss, commissions or spreads.

Order of checks and the 2 states

On each bar, it checks in this order: range-based exits for buy and sell, exits by the ATR stop, then buy and sell entries. When an exit and a re-entry occur on the same bar, a dot and an arrow may overlap at the same position. Both directions can also be active at the same time. This is a fixed calculation order using OHLC and does not reproduce whether the high or the low came first within that bar.

4

Situations for reading the display

Distinguish the 4 kinds of marks

Indicator
Green arrow = buy entry, red arrow = sell entry, blue dot = buy exit, orange dot = sell exit.
Cross-check
They are not actual orders but 2 calculated states built from the same history.
Check
Also check whether marks overlap on the same bar.
Caution
Exit dots are on the low/high side and are not the price at which a position is closed.

Compare setting differences

Indicator
Trade Period=10, Stop Period=5, ATR Factor=1. A comparison with 3 items changed. Because both the entry and exit conditions change, it does not show the effect of each setting or recommended values.
Cross-check
Use the same symbol, timeframe and history.
Check
Look at how the changed setting relates to the increase or decrease and the position of the marks.
Caution
The published settings are not recommended values.

Reading intervals without marks

Indicator
Each time, it recalculates the entire loaded history from the oldest side, and at the start neither buy nor sell is entered. Judgment starts from max(Trade Period, Stop Period, ATR Period−1) in 0-based bar numbering. With Closed Bars Only=true, the latest forming bar is not judged, and calculation goes up to the bar 1 before it. If history is insufficient or conditions are not met, no marks appear. Because past states are carried over, marks may change with the history start position, additions or corrections.
Cross-check
Check the required history and whether the conditions are met.
Check
Do not treat the absence of marks as the calculation having stopped.
Caution
Nothing may be displayed during periods when the conditions are not met.
5

Steps for checking the display

1

Apply with the defaults

Load the history in MT5, and first apply only this product to the chart.

2

Check the role of the display

A green up arrow marks a bar that entered the buy state; a red down arrow, a bar that entered the sell state. Buy and sell are managed separately.

3

Comparing settings

Put the default and the change example on separate charts, with the same symbol, timeframe and history.

4

Distinguish the forming bar from past states

Each time, it recalculates the entire loaded history from the oldest side, and at the start neither buy nor sell is entered. Judgment starts from max(Trade Period, Stop Period, ATR Period−1) in 0-based bar numbering. With Closed Bars Only=true, the latest forming bar is not judged, and calculation goes up to the bar 1 before it. If history is insufficient or conditions are not met, no marks appear. Because past states are carried over, marks may change with the history start position, additions or corrections.

6

Installation and checking the package contents

Included filePurpose / location
TRI_Turtle_Entry_Exit_Marks.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 14 inputs. Change them on the Inputs tab of the properties. The English item names and input names defined in the source are shown together.

Preceding bars used for entry

English item name
Trade Period
Input name
InpTradePeriod
Default
20
Allowed range
1–1000 (integer)
Description
Compares with the highest high and lowest low of this number of bars, excluding the current bar.

Preceding bars used for range-based exits

English item name
Stop Period
Input name
InpStopPeriod
Default
10
Allowed range
1–1000 (integer)
Description
Excluding the current bar, the lowest low / highest high of this number of bars is used for exits from the buy / sell state. Separate from the fixed ATR stop.

Entry check with the high and low as well

English item name
Strict Entry
Input name
InpStrictEntry
Default
false
Allowed range
true / false
Description
true adds high and low conditions to the close condition. The name Strict does not mean that the condition is narrowed to a stricter one.

Range-based exit check with the high and low as well

English item name
Strict Exit
Input name
InpStrictExit
Default
false
Allowed range
true / false
Description
true also checks the low for buys and the high for sells. With Greedy=true, this low/high is also compared with the entry value.

ATR stop check with the high and low as well

English item name
Strict Stop
Input name
InpStrictStop
Default
false
Allowed range
true / false
Description
Effective only with Evaluate Stop=true. true also checks a break of the stop by the low for buys and by the high for sells.

Add a favorable-side condition to range-based exits

English item name
Greedy
Input name
InpGreedy
Default
false
Allowed range
true / false
Description
true also requires check price>entry value for buys and check price<entry value for sells. The close branch compares the close; the Strict Exit branch compares the low/high. It does not exit merely by reaching the favorable side; a range break is also required. The ATR stop is not restricted.

Check exits by the fixed ATR stop

English item name
Evaluate Stop
Input name
InpEvaluateStop
Default
true
Allowed range
true / false
Description
Even with false, exits by Stop Period remain. ATR Period is used for the start position, so even when the stop is disabled it must satisfy the history condition and the input range.

ATR bars used for the fixed stop

English item name
ATR Period
Input name
InpATRPeriod
Default
20
Allowed range
1–1000 (integer)
Description
Simple average of the true range including the current bar. Only the ATR of the entry bar is used for the fixed stop.

ATR multiplier for the fixed stop

English item name
ATR Factor
Input name
InpATRFactor
Default
2
Allowed range
0–100 (finite number)
Description
Buy: entry value−ATR×multiplier; sell: entry value+ATR×multiplier. 0 does not disable it; it gives a stop equal to the entry value.

Check closed bars only

English item name
Closed Bars Only
Input name
InpClosedBarsOnly
Default
true
Allowed range
true / false
Description
true excludes the latest forming bar from the calculation. With false, marks and states change with changes in the latest bar's high, low and close.

Brand and QR

English item name
Show Trilogy brand and QR code
Input name
InpTriBrandShow
Default
true
Allowed range
true / false
Description
Displayed with true. Calculated values do not change.

Brand 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
The default is bottom left.

Horizontal margin

English item name
Brand horizontal offset (pixels)
Input name
InpTriBrandX
Default
10
Allowed range
Integer (pixels)
Description
Negative values are treated as 0, and values above 4000 are treated as 4000.

Vertical margin

English item name
Brand vertical offset (pixels)
Input name
InpTriBrandY
Default
10
Allowed range
Integer (pixels)
Description
Negative values are treated as 0, and values above 4000 are treated as 4000.
8

Usage specifications

Display only

It does not place, modify or close orders. There are no notifications or emails either.

State recalculation and the forming bar

Each time, it recalculates the entire loaded history from the oldest side, and at the start neither buy nor sell is entered. Judgment starts from max(Trade Period, Stop Period, ATR Period−1) in 0-based bar numbering. With Closed Bars Only=true, the latest forming bar is not judged, and calculation goes up to the bar 1 before it. If history is insufficient or conditions are not met, no marks appear. Because past states are carried over, marks may change with the history start position, additions or corrections.

Mark positions

The green buy-entry arrow and the blue buy-exit dot are 10 pixels below the bar's low. The red sell-entry arrow and the orange sell-exit dot are 10 pixels above the high. The dots are not at the fill price or the stop price.

Brand display

Shows Produced by Trilogy Inc. and a QR code to https://www.trgy.co.jp/. When the same medium is used on the same chart, the display is shared. There is no account authentication.

Lines and prices are not shown

Only entry and exit marks are shown. The reference channel lines, ATR stop lines and entry price text are not drawn. Do not read stop prices or profit and loss from the height of the exit dots.

When a state lasts a long time

With Greedy=true and Evaluate Stop=false, it does not exit on a range breakout to the unfavorable side and may keep the state for a long time until the conditions are met.

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

No marks, or blanks in the middle

Each time, it recalculates the entire loaded history from the oldest side, and at the start neither buy nor sell is entered. Judgment starts from max(Trade Period, Stop Period, ATR Period−1) in 0-based bar numbering. With Closed Bars Only=true, the latest forming bar is not judged, and calculation goes up to the bar 1 before it. If history is insufficient or conditions are not met, no marks appear. Because past states are carried over, marks may change with the history start position, additions or corrections.

The input is not accepted

Check the ranges and combinations in the settings. Keep the inputs for unused methods within range as well.

Display differs from Turtle Channel

Turtle Channel is a separate product that shows a channel and direction. This product manages buy and sell separately and uses entry, exit and fixed ATR stop conditions. Do not assume that the marks match even with the same period.

Displays overlap

Use separate charts, or adjust the brand position and margins. The images can also be checked at full size.

An arrow and a dot overlap on the same bar

On each bar, it checks in this order: range-based exits for buy and sell, exits by the ATR stop, then buy and sell entries. When an exit and a re-entry occur on the same bar, a dot and an arrow may overlap at the same position. Both directions can also be active at the same time. This is a fixed calculation order using OHLC and does not reproduce whether the high or the low came first within that bar.

A dot appears on the unfavorable side of the entry price

Dots are on the low side of the bar for buys and on the high side for sells. They do not show the exit check price or actual profit or loss. Greedy acts only on range-based exits, not on the ATR stop.

No dot appears even with Greedy=true

Greedy=true adds a condition only to range-based exits. For buys, an exit by the close requires close>entry value, and an exit by the low requires low>entry value. For sells, close<entry value and high<entry value are required respectively. It is not a function that exits simply on reaching the favorable side; a break of the Stop Period range is also required. It does not calculate actual profit or loss, commissions or spreads.

It exits even with ATR Factor=0

0 sets the stop equal to the entry bar's close. If you do not use the ATR stop, set Evaluate Stop=false.

Marks are cut off at the edge of the screen

Adjust the vertical scale and display range, and also check at full size.

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

Calculation and reference range

The entry reference is the highest high RH and lowest low RL of the preceding Trade Period bars, excluding the current bar. When not in the buy state, close>RH enters the buy state; when not in the sell state, close<RL enters the sell state. With Strict Entry=true, high>RH / low<RL are also added as conditions. The entry value is that bar's close (the same for entries by the high or low). The exit references SH and SL are the highest high and lowest low of the preceding Stop Period bars, excluding the current bar. In the buy state, close<SL exits; in the sell state, close>SH exits. With Strict Exit=true, low<SL / high>SH are also checked. The additional conditions for Greedy=true and the ATR stop are described below. A value equal to the reference does not meet the condition.

Initial values and exceptions

Each time, it recalculates the entire loaded history from the oldest side, and at the start neither buy nor sell is entered. Judgment starts from max(Trade Period, Stop Period, ATR Period−1) in 0-based bar numbering. With Closed Bars Only=true, the latest forming bar is not judged, and calculation goes up to the bar 1 before it. If history is insufficient or conditions are not met, no marks appear. Because past states are carried over, marks may change with the history start position, additions or corrections.

Package contents and dependencies

Only MT5 itself and this manual. Account authentication, external indicators and DLLs are not required.

Fixed stop calculation

The true range TR is max(current high, previous close)−min(current low, previous close); only the first bar of the history uses high−low. ATR is the simple average of TR over ATR Period bars including the current bar. The buy stop is fixed at the entry bar's close−ATR×ATR Factor and the sell stop at close+ATR×ATR Factor; they do not trail afterward. With Evaluate Stop=true, a buy exits when the close falls below the stop and a sell when the close rises above it. With Strict Stop=true, the low for buys / the high for sells is also checked. It is not affected by whether Greedy is set. On a bar that has just entered, the stop check for that entry is not yet performed.

State update order

On each bar, it checks in this order: range-based exits for buy and sell, exits by the ATR stop, then buy and sell entries. When an exit and a re-entry occur on the same bar, a dot and an arrow may overlap at the same position. Both directions can also be active at the same time. This is a fixed calculation order using OHLC and does not reproduce whether the high or the low came first within that bar.