MT5 indicators← DI Cross Arrows 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

DI Cross Arrows

Shows up and down arrows on bars where the order of +DI and −DI switched.

Indicator name: DI Cross ArrowsMetaTrader 5Overlaid on the price chart

Arrows mark a DI switch. They are not price forecasts

The DI order switches to the opposite sideGreen arrow: to +DI larger Red: to −DI largerOn the actual screen, arrows are below the low / above the high
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Read the up arrowWhen it switches to +DI being larger, a green arrow appears below the bar's low.

2

Read the down arrowWhen it switches to −DI being larger, a red arrow appears above the high.

3

Check whether the bar is closedThe default is closed bars only. With false, arrows on the forming bar also change.

Default is closed bars onlySwitches across equal values also countGap is in pixels
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
DI period
InpPeriod
14 → 15
DI method
InpDiType
Standard → Hull
Show closed bars only
InpClosedBarsOnly
true → false
Arrow gap
InpArrowGap
8 → 14

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 settingsInpPeriod = 14 / InpDiType = Standard / InpClosedBarsOnly = true / InpArrowGap = 8
DI Cross Arrows default settings
Default 14, Standard, closed bars only, spacing 8 pixels. Green is an up arrow and red is a down arrow.
View the screen in detail at full size
DI Cross Arrows default settings (full size)
Settings change exampleInpPeriod = 15 / InpDiType = Hull / InpClosedBarsOnly = false / InpArrowGap = 14
DI Cross Arrows settings change example
Changed to 15, Hull, showing the forming bar too, and a 14-pixel gap. Alerts are false in both.
View the screen in detail at full size
DI Cross Arrows settings change example (full size)

Example shown: 1-minute chart (M1). This is an example for explaining the display. 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

Look at direction and position

Up arrows are below the low; down arrows are above the high.

Look at the method

Standard and Hull differ in how DI is processed after calculation.

Look at the bar's state

When the forming bar is also shown, arrows appear, disappear and change position.

3

What it measures

This display records switches in the DI order. The arrows alone do not specify a trading action.

Standard

Based on the DI calculation of the MT5 standard ADX family, it compares +DI and −DI. The height of ADX is not used in the arrow condition.

Hull

Uses DI with period n and DI with period n/2 rounded down, and compares 2 × short DI − long DI. It is not a method that calculates a full general HMA.

When equal values occur in between

On bars where DI values are equal, the direction of the last non-equal state is held. A switch is counted when the order changes to the opposite.

Arrow distance

Shifted outward from the high or low by a number of pixels. It is not a price difference or a value in pips.

4

Situations for reading the display

Green up arrow

Indicator
A switch to +DI being larger.
Cross-check
The same bar and the previous non-equal state.
Check
Check whether the bar is closed and which method is used.
Caution
Not a guarantee that the price will rise.

Red down arrow

Indicator
A switch to −DI being larger.
Cross-check
Cross-check the mark above the high against the settings.
Check
Record the bar where the switch occurred.
Caution
Does not show the range or the strength of ADX.

A mark after a run of equal values

Indicator
The order became the opposite of the order before the equal values.
Cross-check
Check back to just before the equal values.
Check
Understand that it is not a comparison with only the 1 previous bar.
Caution
No mark appears on the equal values themselves.

The mark on the current bar disappears

Indicator
The condition changed under the setting that also shows the forming bar.
Cross-check
Check Closed Bars Only.
Check
If needed, set it to true for closed bars only.
Caution
Do not treat marks under false as a final record.
5

Steps for checking the display

1

Start with Standard and the default 14

Check the display with closed bars only set to true and alerts left at false.

2

Check the upper and lower positions

Up marks are below the low and down marks are above the high. The gap is in pixels.

3

Compare Hull as a separate condition

Hull with period 15 and Standard with 14 differ in several conditions.

4

Enable alerts only when needed

A function that notifies you of a switch on the latest closed bar. Past marks at the time of attaching are not notified.

6

Installation and checking the package contents

Included filePurpose / location
TRI_DI_Cross_Arrows.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. Place only 1 instance of the same product on 1 chart.

4

Check the settings and display

First check with the default values. Changes and removal are done from the chart's 'Indicators List'.

This product does not require DLL permission or enabling automated trading. When removed, this product's drawings are cleared.

7

Settings

There are 5 inputs. Change them on the Inputs tab of the properties. The English display name and the input name in the code are shown together.

DI period

Name shown on screen
DI Period
Input name
InpPeriod
Default
14
Allowed range
Standard: integer 1 to 500; Hull: 2 to 500
Description
The base period for DI. The half period for Hull is rounded down.

DI method

Name shown on screen
DI Type
Input name
InpDiType
Default
Standard
Allowed range
Standard / Hull
Description
Standard is the base DI; Hull is 2 × half-period DI − base-period DI.

Show closed bars only

Name shown on screen
Closed Bars Only
Input name
InpClosedBarsOnly
Default
true
Allowed range
true / false
Description
true leaves the current bar empty. With false, the mark on the current bar is also updated.

Arrow gap

Name shown on screen
Arrow Gap (pixels)
Input name
InpArrowGap
Default
8
Allowed range
Integer 0 to 100 pixels
Description
The display distance below the low and above the high. It is not in pips.

Alert on closed bars

Name shown on screen
Alert on Closed-Bar Cross
Input name
InpAlert
Default
false
Allowed range
true / false
Description
Default false. With true, a switch on the latest closed bar is notified by Alert. Even if the display is extended to the forming bar, only closed bars are notified.
8

Usage specifications

Start of notifications

Right after attaching or reinitializing, past switches are not notified. After that, it notifies only when a switch occurs on a new latest closed bar.

Notification target

Even when several bars advance at once, it looks only at the 1 latest closed bar. There is no email or push sending function.

History and initial display

The initial section up to period n and the first direction are not treated as switches. Marks appear only after both the required history and the switch condition are met.

Redrawing

It is recalculated on the forming bar, on history updates and on settings changes. Permanent non-repainting is not guaranteed.

Only 1 instance of the same product on 1 chart

This manual describes adding 1 instance of this product to 1 chart. To compare different settings, use separate charts.

For on-screen display only

This product shows calculation results through plot buffers and does not place trade orders. It does not guarantee profit or future price movement.

9

Troubleshooting and usage notes

No arrows

They do not appear unless DI switches on a closed bar. Check the number of history bars, the method and Closed Bars Only.

No alerts arrive

InpAlert is false by default. Past switches at the time of attaching are not notified; only a switch on the latest closed bar is covered.

Arrows are too far / overlap

Adjust the gap from 0 to 100 pixels. Also check the chart's zoom level and the size of the candles.

Does not start with Hull

Period 1 cannot be used. Set the period back to 2 or more and check the English message in the Experts tab.

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

Definition of a switch

+DI > −DI is +1, +DI < −DI is −1, and equal values hold the last non-0 direction. A mark is placed on a bar where there was a non-0 direction before and it changed to the opposite side.

Price values and pixel shift

The up arrow buffer holds the low and the down arrow buffer holds the high, and they are shifted up or down by PLOT_ARROW_SHIFT. The arrow tips on screen are not designed to be used as limit prices.

Alerts and recalculation

Alerts are checked when the time of the latest closed bar is newer than the last alert-tracking time. Recalculating history and resending past alerts are kept separate.