MT5 indicators← AO Average Line 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

AO Average Line

Draws the difference between short-term and long-term SMAs of the median price as bars and overlays its moving average as a gold line. If needed, crossings of the average line on closed bars and crossings of 0 can be notified.

Indicator name: AO Average LineMetaTrader 5Separate window

Read bar height, bar color and the average line separately

Short-term SMA of the median price − long-term SMA = AODraw AO as bars and the AO average as a gold lineIf notifications are ON, crossings on closed bars are judgedThe sign of the bars, the increase/decrease colors and the average line are separate information
Schematic diagram of how to read it. This is not an actual terminal screen.
1

Bar value: AOThe fast SMA of the median price minus the slow SMA.

2

Bar color: increase or decrease from the previous barGreen is an increase, red a decrease. If the value is the same, the previous color continues.

3

Gold line: AverageA line that averages AO itself. It is not a moving average of price.

Default AO: median price SMA5−SMA34The average line is the average of AONotifications are OFF by default
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
Fast SMA period
InpFastPeriod
5 → 10
Slow SMA period
InpSlowPeriod
34 → 50
AO average period
InpAveragePeriod
5 → 3
AO average method
InpAverageMethod
Simple (SMA) → Smoothed (SMMA)

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 settingsInpFastPeriod = 5 / InpSlowPeriod = 34 / InpAveragePeriod = 5 / InpAverageMethod = Simple (SMA)
AO Average Line default settings
AO 5/34 and an SMA5 average line. There are red bars above 0 as well, showing that color and sign are separate.
View the screen in detail at full size
AO Average Line default settings (full size)
Settings change exampleInpFastPeriod = 10 / InpSlowPeriod = 50 / InpAveragePeriod = 3 / InpAverageMethod = Smoothed (SMMA)
AO Average Line settings change example
Changed to AO 10/50 and average SMMA 3. The shapes of the bars and the gold line have changed. Notifications are OFF in both images.
View the screen in detail at full size
AO Average Line settings change example (full size)

Example shown: 1-minute chart (M1). 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. The vertical axis of the separate window is adjusted automatically for each image, so do not compare values by on-screen height alone.

2

How to read it in 30 seconds

Height

Read the distance from 0 and the sign.

Colors

Read whether it increased or decreased from the previous bar.

Averages

Compare the tip of the bar with the position of the gold line.

3

What it measures

Even if AO is positive, it becomes red when it decreases; even if negative, it becomes green when it increases.

AO

Median price=(high+low)÷2. AO is its fast SMA−slow SMA. The default 5/34 uses the same formula as the standard Awesome Oscillator.

Average line

One of SMA, EMA, SMMA or LWMA is applied to AO. This setup overlays an average line that the standard AO does not have.

Color continuation

SeaGreen for an increase, Tomato for a decrease. For an equal value, the previous color is kept, and the first value starts with green.

Definition of a crossing

Handles bars where the sign of the difference from the average, or of AO relative to 0, becomes opposite. Bars with an equal value carry over the previous sign.

4

Situations for reading the display

The bars crossed the gold line

Indicator
The above/below relationship between AO and its average has changed.
Cross-check
Compare the tip of the bar with the gold line on the bars before and after.
Check
Distinguish a temporary crossing on the forming bar from one on a closed bar.
Caution
Notifications are judged on values before display rounding, so the judgment may differ even when they look overlapped.

The color changes near 0

Indicator
The color is the increase or decrease from the previous bar.
Cross-check
Look at the value of the previous bar, separately from above or below 0.
Check
Also take into account small values and the effect of rounding.
Caution
Do not judge from color alone that it crossed 0.
5

Steps for checking the display

1

Check with notifications OFF

Tell apart the bars, the average line and the 0 line.

2

Look at the comparison example

Check the difference when the AO periods and the averaging method and period are changed.

3

Select only the notifications you need

Average crossings and 0 crossings can be enabled separately.

6

Installation and checking the package contents

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

Fast SMA period

Name shown on screen
Fast Period
Input name
InpFastPeriod
Default
5
Allowed range
1 to 999 bars, less than Slow
Description
Short-term side of AO.

Slow SMA period

Name shown on screen
Slow Period
Input name
InpSlowPeriod
Default
34
Allowed range
2 to 1000 bars, larger than Fast
Description
Long-term side of AO.

AO average period

Name shown on screen
Average Period
Input name
InpAveragePeriod
Default
5
Allowed range
1–1000 bars
Description
At 1, the average line overlaps AO.

AO average method

Name shown on screen
Average Method
Input name
InpAverageMethod
Default
Simple (SMA)
Allowed range
SMA, EMA, SMMA, LWMA
Description
The average applied to AO; it does not change the SMA method of AO itself.

Average line crossing notification

Name shown on screen
Alert on Closed-Bar Average Cross
Input name
InpAlertAverageCross
Default
false
Allowed range
false / true
Description
true makes it a notification target when AO on a closed bar moves to the opposite side of the average line.

0 crossing notification

Name shown on screen
Alert on Closed-Bar Zero Cross
Input name
InpAlertZeroCross
Default
false
Allowed range
false / true
Description
true makes it a notification target when AO on a closed bar moves to the opposite side of 0.
8

Usage specifications

Forming bar and recalculation

While the latest bar's price is moving, the displayed values and colors can also change. They are recalculated when history is added or corrected or settings change. Permanent non-repainting is not guaranteed.

Conditions for comparison

Compare with the same symbol, timeframe, settings and loaded history. The display is not a forecast of future price movement.

Start of drawing

AO starts from bar Slow. The average starts on the same bar with EMA, and with other methods Average−1 bars later. The defaults are AO from the 34th bar and the average from the 38th bar.

Timing of notifications

On the first price update of a new bar, the immediately preceding closed bar is judged. The time in the message is the start time of the bar where the crossing occurred. Times during market closures or feed interruptions are not guaranteed.

Start and recovery of notifications

In the first calculation after attaching or changing settings, it only records and does not notify past crossings. Even if several bars close at once, it checks only the latest closed bar and does not notify past ones all together.

When it touches and returns

Merely touching the average or 0 and returning to the same side is not counted as a crossing. A bar that passes through an equal value to the opposite side is counted. Because the judgment uses exact internal values, small rounding differences also have an effect.

2 kinds of notifications

If both conditions are met on the same closed bar, each becomes a notification target. Notifications are in English and include the symbol, timeframe and bar time. They are a record of a crossing and do not indicate the direction of the next bar.

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 orders. It does not guarantee profit or future price movement.

9

Troubleshooting and usage notes

No notification appears

Both of the 2 kinds are false by default. Crossings that occur only on the forming bar and past crossings at the time of attaching are not notification targets.

No average crossings

If Average Period is 1, the average overlaps AO, and no crossing with the average occurs.

Nothing is shown after entering inputs

Check the allowed range of the inputs and the number of history bars. Outside the range, the indicator does not start, and the reason is shown in English in the Experts tab of the Toolbox. No explanation is shown on the chart.

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

Average and starting value

EMA starts from the first AO value; SMA, SMMA and LWMA start once the required number of bars is available. The AO colors and average line do not mean the display is identical to the standard AO.

Notification judgment

The sign of AO−average, or of AO, is kept for each bar, and when it is exactly equal to 0, the previous sign is carried over. A change to the opposite non-zero sign is judged on closed bars.

Display

The bars are SeaGreen/Tomato, the average line is Gold and the 0 line is Silver. Display rounding is the symbol's decimal places + 2 digits.