Sign
+ is the increasing side and − is the decreasing side.
Counts how many bars the difference between a short-term and a long-term average has continued in the same direction of increase or decrease. The increasing side is shown as positive and the decreasing side as negative, and bars with the same value are also included in the count.
Green positive barsThe number of bars the increasing side has continued. Equal values along the way are included.
Red negative barsThe number of bars the decreasing side has continued. Equal values along the way are included.
±1 when the direction changesA new count starts from the bar where the increase or decrease of AO reverses.
Compares the default settings and a settings change example on a screen with only this product applied.
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.
+ is the increasing side and − is the decreasing side.
Read how many bars it has continued, including equal values.
A bar where the direction changed is +1 or −1.
+5 means "the increasing side has continued for 5 bars, including equal values." It does not mean price rose for 5 consecutive bars.
Calculates fast average − slow average of the selected price and looks at the direction of its difference from the previous bar.
If the direction is the same as before, 1 is added; if the value is equal, 1 is added while keeping the previous direction.
If the first comparison is an equal value, it starts on the increasing side. After drawing starts, the value never becomes 0.
Even if values look equal, direction is judged if there is a tiny internal difference. That difference can show up in the integer count.
The vertical axis is an integer number of bars.
Read green/red and the distance from 0 separately.
Check the switching positions with the default 5/34 and the change example 3/10.
| Included file | Purpose / location |
|---|---|
| TRI_AO_Run_Length.ex5 | The 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.
Extract the ex5 main file rather than leaving it in the compressed file.
In MT5, open MQL5/Indicators from 'File → Open Data Folder' and place the included ex5 there.
Refresh the Navigator or restart MT5, and apply it to the target chart. Place only 1 instance of the same product on 1 chart.
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.
There are 4 inputs. Change them on the Inputs tab of the properties window. The English display names are shown together with the input names in the code.
InpFastPeriodInpSlowPeriodInpMethodInpPriceWhile 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.
Compare with the same symbol, timeframe, settings and loaded history. The display is not a forecast of future price movement.
SMA, SMMA and LWMA start from bar Slow+1, and EMA from the 2nd bar. The default display starts from the 35th bar.
If the calculated values are exactly the same, the direction is kept and the count keeps increasing. It does not directly represent the strength of price movement.
The default inputs use the same formula as the standard AO (SMA 5/34, median price), but what is drawn is the run count, not the AO value. There are no notifications.
This manual describes adding 1 instance of this product to 1 chart. To compare different settings, use separate charts.
This product shows calculation results through plot buffers and does not place orders. It does not guarantee profit or future price movement.
After drawing starts, the value is always +1 or more or −1 or less. The 0 line is the reference for comparison.
Moving averages include earlier prices, and internal rounding also affects the increase/decrease judgment.
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.
Input AO=MA(Fast,price)−MA(Slow,price). If AO increases, direction is +1; if it decreases, −1; if equal, the previous direction. If the direction continues, the count increases by 1; if it changes, it becomes 1. The count × direction is shown.
SeaGreen is positive and Tomato is negative. Values are shown as integers, and there is no cap such as 200 bars.