MT5 indicators← Deviation Bands Plus 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

Deviation Bands Plus

Compares the selected moving average with upper and lower lines based on the dispersion of prices around it.

Indicator name: Deviation Bands PlusMetaTrader 5On the price chart

A center line, and upper and lower lines derived from the dispersion

Upper = center + multiplier × dispersionCenter = selected averageLower = center − multiplier × dispersionSet 2 is optional. The width changes with the dispersion of prices.
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Center lineThe value calculated from the selected price and MA Method.

2

Upper and lower linesThe multiplier is applied to the dispersion measured from the current center.

3

Set 2Setting Deviation 2 above 0 draws 1 more set of upper and lower lines.

5 types of centerSelectable deviation priceUp to 2 sets of upper and lower lines
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
Center method / MA Method
InpMethod
Simple → Linear Weighted
Center price / MA Price
InpPrice
Close → Typical (H+L+C)/3
Dispersion price / Deviation Price
InpDevPrice
Same as the MA Price → Close
Set 1 multiplier / Deviation 1
InpDeviation1
2 → 1
Set 2 multiplier / Deviation 2 (0 = off)
InpDeviation2
0 → 2.5

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 settingsInpMethod = Simple / InpPrice = Close / InpDevPrice = Same as the MA Price / InpDeviation1 = 2 / InpDeviation2 = 0
Deviation Bands Plus default settings
Simple, 20, Close, Deviation 1 = 2. Shows a dashed center line and 1 pair of upper and lower lines.
View the screen in detail at full size
Deviation Bands Plus default settings (full size)
Settings change exampleInpMethod = Linear Weighted / InpPrice = Typical (H+L+C)/3 / InpDevPrice = Close / InpDeviation1 = 1 / InpDeviation2 = 2.5
Deviation Bands Plus settings change example
Linear Weighted and Typical, Deviation Price = Close, Deviation 1 = 1, Deviation 2 = 2.5. Parts of the upper and lower lines extend beyond the screen.
View the screen in detail at full size
Deviation Bands Plus 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

Gray dashed line

The moving average used as the center.

Blue solid and dotted lines

Set 1 is RoyalBlue; the optional set 2 is a SteelBlue dotted line.

Do not use the lines as signals

The upper and lower lines are calculation results. They do not specify entries, targets or stop losses.

3

What it measures

The width is not a fixed price difference or a fixed percentage; it is calculated from the selected center and price.

Basis of the dispersion

The difference between each price of the latest Period bars and the 'center of the current bar' is squared, and the square root of their average is used. If the center method or the deviation price differs, the width also changes.

LSMA center

Linear Regression is the value at the latest bar of the least-squares line over the period. It is not a forecast of future prices.

Deviation Price

Same as the MA Price uses the same price as the center; Close uses the close. Selecting Close does not change the price specified for the center.

Statistical caveat

There is no guarantee that prices stay inside the band with a certain probability. A center such as EMA differs from the simple average of the calculation window.

4

Situations for reading the display

Reading changes in width

Indicator
Distance from the center to the upper and lower lines
Cross-check
Compare the width before and after with the same settings
Check
Check the sections where the dispersion of prices changed.
Caution
Do not treat an expansion of the width as a signal of future direction.

Comparing the 2 sets

Indicator
Solid and dotted lines
Cross-check
Check Deviation 1 and 2
Check
Read how the difference in multipliers appears in the upper and lower distances.
Caution
Set 2 is not necessarily on the outside. With a smaller multiplier it is on the inside.
5

Steps for checking the display

1

Check the default settings

Look at the center and the upper and lower lines for Simple, 20, Close and Deviation 1 = 2.

2

Separate the center and the width

MA Method and MA Price are for the center; Deviation Price is the price used for the dispersion.

3

Change 1 item at a time

Do not change the method and the multiplier at once; keep the conditions being compared the same.

6

Installation and checking the package contents

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

Calculation period

English item name
Period
Input name
InpPeriod
Default
20
Allowed range
2 to 1000
Description
The number of bars used to calculate the center and the dispersion.

Center method

English item name
MA Method
Input name
InpMethod
Default
Simple
Allowed range
Simple / Exponential / Smoothed / Linear Weighted / Linear Regression (LSMA)
Description
Simple is a simple average, Exponential is exponential smoothing, Smoothed is a smoothed moving average, and Linear Weighted is an average that weights newer bars more heavily. LSMA is the latest position of the regression line.

Center price

English item name
MA Price
Input name
InpPrice
Default
Close
Allowed range
7 types
Description
Close = close, Open = open, High = high, Low = low, Median = (high + low)/2, Typical = (high + low + close)/3, Weighted = (high + low + close×2)/4.

Dispersion price

English item name
Deviation Price
Input name
InpDevPrice
Default
Same as the MA Price
Allowed range
Same as the MA Price / Close
Description
Select either the same price as the center or the close.

Set 1 multiplier

English item name
Deviation 1
Input name
InpDeviation1
Default
2
Allowed range
0.01 to 10
Description
The multiplier applied to the dispersion.

Set 2 multiplier

English item name
Deviation 2 (0 = off)
Input name
InpDeviation2
Default
0
Allowed range
0 to 10
Description
At 0, set 2 is not drawn. There is no restriction on whether it is larger or smaller than set 1.
8

Usage specifications

The latest bar is forming

The current bar is included in the calculation. The latest displayed values change with price updates.

Calculated on the chart timeframe

There is no function to specify a higher timeframe. Changing the timeframe or the history range also changes what is calculated.

Start of display

No lines are shown until Period bars are available. Even if you select Exponential, the number of bars needed for the dispersion does not change.

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

Nothing is displayed

Check the input ranges and the number of history bars. If an input is out of range, loading is refused and the reason is written to the Experts log.

Colors or thin lines are hard to see

Check the combination with the background and the display scale. Details of the published images can be checked in the full-size view.

Lines extend beyond the screen

The upper and lower lines may fall outside the displayed price range. Not all lines are necessarily visible at all times.

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

Formula

With center M, deviation price d and period N, σ = √(Σ(d−M)²/N). Upper and lower are M ± Deviation × σ. It does not divide by N−1. LSMA is 3×LWMA−2×SMA.

Price and average types

Close = close, Open = open, High = high, Low = low, Median = (high + low)/2, Typical = (high + low + close)/3, Weighted = (high + low + close×2)/4. Simple is a simple average, Exponential is exponential smoothing, Smoothed is a smoothed moving average, and Linear Weighted is an average that weights newer bars more heavily.

Distinguishing what is displayed from what is not yet verified

The inputs and calculations in this document are based on the product's implementation. The actual display in the Data Window and the input screen, and how it looks during long operation on actual symbols or with long history, have not been verified.