MT5 indicators← Bar Close Countdown 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

Bar Close Countdown

Shows the time until the scheduled end of the current timeframe's bar in minutes and seconds (hours, minutes and seconds if 1 hour or more). It is not a signal of price direction or trading timing.

Indicator name: Bar Close CountdownMetaTrader 5Main chart

Check the timeframe → read the remaining time → confirm the new bar

Time boundary of a 15-minute bar10:09= 10 min 9 sFor the appearance of a new bar, also check the price feed
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Timeframe firstEven for the same symbol, M1 and H1 have different boundaries. The timeframe of the chart being displayed is the reference.

2

Remaining time10:09 is 10 minutes 9 seconds. At 1 hour or more it becomes hours:minutes:seconds.

3

Bar formation is separateEven near 0 seconds, a new bar may not yet appear if no new price has been received.

Time guidePlaced in a cornerNo notifications or orders
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
Display corner
InpCorner
Lower right (CORNER_RIGHT_LOWER) → Upper left (CORNER_LEFT_UPPER)
Font size
InpFontSize
10 → 18

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 settingsInpCorner = Lower right (CORNER_RIGHT_LOWER) / InpFontSize = 10
Bar Close Countdown default settings
The remaining time is shown in small text at the lower right of the screen.
View the screen in detail at full size
Bar Close Countdown default settings (full size)
Settings change exampleInpCorner = Upper left (CORNER_LEFT_UPPER) / InpFontSize = 18
Bar Close Countdown settings change example
An example moved to the upper left with the font size set to 18. If it overlaps the candles, adjust the position.
View the screen in detail at full size
Bar Close Countdown settings change example (full size)

Example shown: 15-minute chart (M15). This is an example to explain the display. The settings change example is not a recommended value. Details can be checked in the full-size view.

2

How to read it in 30 seconds

Default is lower right

Look at the small number in the lower right of the screen. If it is hard to see, change the font size and display position.

Do not decide on the number alone

A short remaining time is not a condition for a rise, a fall or an order fill.

Check after the boundary

Confirm the price feed and the new bar on the chart before moving on to decisions that use closed bars.

3

What it measures

Check the time boundary of the current bar in a corner of the chart.

Reference time

The trade server time calculated by the terminal is subtracted from the scheduled end, which is the start time of the chart's current bar plus the length of that timeframe. On the monthly chart, the 1st of the next month is the boundary.

Display range

Negative values are not shown. The display is minutes:seconds or hours:minutes:seconds; there is no dedicated display in days.

What does not change

Changing the display position, font size or color does not change the bar's start time or period.

4

When to use it in decisions

Waiting for the bar to close

Indicator
The remaining time gets smaller
Price
The current bar is still moving
Consideration
After the new bar appears, check the bar 1 before it
Exclusion condition
A display of 0 seconds alone does not guarantee that the bar has closed or that prices are being received

Switching the timeframe

Indicator
The length of the remaining time changes
Price
The bar interval on the chart also changes
Consideration
Check the chart's timeframe and read it again
Exclusion condition
Do not directly compare numbers from different timeframes

The number overlaps the candles

Indicator
Overlaps are likely in the upper left or upper right
Price
The area near the recent high may be hidden
Consideration
Move it to an empty corner or make the text smaller
Exclusion condition
The display position has no market meaning

The price feed has stopped

Indicator
Only the clock advances, or it becomes 0
Price
No new candle forms
Consideration
Check the terminal connection and trading hours
Exclusion condition
Do not treat the movement of the number as evidence of price updates
5

Actual decision steps

1

Check the symbol and timeframe

Attach it to a chart of the timeframe you want to use.

2

Adjust position and text

At first it is lower right, size 10. Choose a position that does not hide price movement.

3

Read the remaining time

Distinguish minutes:seconds from hours:minutes:seconds.

4

Confirm the new bar separately

For conditions that use closed bars, confirm that a new candle has actually appeared.

6

Installation and checking the package contents

Included filePurpose / location
TRI_Bar_Close_Countdown.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 3 inputs. Change them on the Inputs tab of the properties. The English display name and the input name in the code are shown together.

Display corner

Name shown on screen
Display Corner
Input name
InpCorner
Default
Lower right (CORNER_RIGHT_LOWER)
Allowed range
Choice of four corners
Description
CORNER_LEFT_UPPER = upper left, LEFT_LOWER = lower left, RIGHT_UPPER = upper right, RIGHT_LOWER = lower right. It is fixed to the corner of the chart.

Font size

Name shown on screen
Font Size
Input name
InpFontSize
Default
10
Allowed range
Integer from 6 to 72
Description
A larger size is easier to read, but it overlaps candles and other displays more easily.

Text color

Name shown on screen
Text Color
Input name
InpColor
Default
Chocolate
Allowed range
Select a color
Description
The default is Chocolate (brownish orange). Choose a color that can be distinguished from the chart background.
8

Usage specifications

Time boundaries and price feed

On regular timeframes, while waiting for a new bar slightly after the scheduled end of the latest bar, the display may carry over to the time until the next boundary. This carry-over is not done on weekly and monthly charts. A 0 shown while the market is closed is not necessarily an error.

Clock assumptions

The remaining time depends on the terminal's time calculation. Pay attention to PC clock drift, connection status and differences in trading hours.

When data cannot be obtained

The numbers may not appear yet, or earlier numbers may remain. Updating resumes when new data is obtained.

Only 1 instance of the same product on 1 chart

If you add the same product to the same chart more than once, the drawings overwrite each other, or deleting one also removes the display of the other. To use different settings at the same time, use separate charts.

For on-screen display only

It has no value buffers and shows its output as lines and text on the chart. It does not place trade orders or issue alerts. It does not guarantee profit or market direction.

9

Troubleshooting and usage notes

The number is not visible

Check the four corners of the chart and the color you set. If the setting cannot be applied, check that the font size is within 6 to 72.

The number and the bar change do not happen at the same time

A new bar requires a new price to be received. Look at the clock boundary and the actual appearance of the candle separately.

Large text gets in the way

Lower Font Size or change Display Corner to another corner. The upper left / 18 in the change example is not a recommended value.

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

Time calculation

Scheduled end − the terminal's trade server time. The scheduled end of a monthly bar is the 1st of the next month. For ordinary bars, it is carried forward once only for a delay of less than 1 period, and finally kept within 0 to 1 period.

Updates and drawing

The label is updated by recalculation on price updates and by a timer that targets a 1-second interval. The time at which the screen reflects it changes with load and feed conditions. The drawing is 1 label, and there are no output buffers.