Blue line
The Step MA drawn 1 step inside the held bands.
Shows a line that moves in steps and a direction state, from a fixed "step" and held bands.
Blue lineThe Step MA drawn 1 step inside the held bands.
Green and orange-red dotsShow the internal upward and downward state. They are not the slope of the line itself.
Fixed or ATRIf Fixed Step is positive, fixed points are used; if 0, the step is determined from the ATR history.
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 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.
The Step MA drawn 1 step inside the held bands.
Show the internal upward and downward state. They are not the slope of the line itself.
If Fixed Step is positive, fixed points are used; if 0, the step is determined from the ATR history.
Shows a line that moves in steps and a direction state, from a fixed "step" and held bands.
If Fixed Step is positive, the specified points are used. If 0, the step is determined from the cumulative maximum and minimum of the ATR multiplied by Sensitivity, and fractional points are truncated. It is not a width determined only by the most recent ATR.
The default bands are close ± 2 steps. If the close exceeds the previous upper band, the state becomes upward; if it falls below the previous lower band, it becomes downward. The bands used for the direction comparison are not drawn.
In the upward state the lower band is not lowered, and in the downward state the upper band is not raised. This does not mean that both bands always stop while the price is inside the bands.
The line is placed 1 step of that bar inside the held band. With the ATR method, when the step changes, the line in the upward state may fall, and the line in the downward state may rise. Do not treat the dot color and the line slope as the same thing.
First, with the default settings, check the meaning of the lines and dots and the initial blank area.
Check the step method, the number of bars for the average, the close used and the drawing style in the Inputs tab.
Align the settings and timeframe, and observe closed bars and the forming bar separately.
| Included file | Purpose / location |
|---|---|
| TRI_Step_MA_Plus.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. When comparing different settings, using separate charts makes checking easier.
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.
There are 5 inputs. Change them on the Inputs tab of the properties. The English item names and input names defined in the source are shown together.
InpATRPeriodInpSensitivityInpStepPointsInpHighLowInpShowDotsIn ATR mode, no line appears on the oldest ATR Period bars, and calculation starts from the next bar. With a fixed step, it starts from the oldest bar. Because the ATR extremes and the band are carried over, the result also depends on where the history starts.
When the close, high or low of the latest bar changes, the state of the line, step and dots can also change. This is not a closed-bar-only product.
With a fixed step, the line does not fall while the same upward state continues, and does not rise while the same downward state continues. Do not apply this property as is to ATR mode.
It calculates on the chart's timeframe. It does not specify a higher timeframe, send notifications, place orders, trade automatically or modify stop orders.
The display is a record of calculation results. It does not direct trading decisions and does not guarantee future price movements.
Because the bands are held, the line can become flat. With the ATR method, the line also moves when the step changes. The dots show the internal state; they do not directly color whether the line went up or down.
Check the required number of history bars and the input ranges. With inputs out of range, loading is refused and the reason is shown in the log.
With the ATR method, the step is truncated to integer points, so it may become 0. Check the fixed step and ATR method settings separately.
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.
The true range is high − low on the first bar and max(high, previous close) − min(low, previous close) after that. The ATR is the simple average of the last A bars. The step is either the fixed value or 0.5 × Sensitivity × (cumulative maximum ATR + cumulative minimum ATR)/Point truncated to an integer. The first ATR is used from bar number A (counting the oldest as 0).
The initial value of the maximum ATR is 0, that of the minimum ATR is 10000, and the previous bands and direction are 0. Therefore, with extreme prices or ranges, and at the start of the history, these initial values have an effect. It has not been checked that the display looks the same for all symbols, digit counts and long histories.
The candidates are lo + 2 steps and hi − 2 steps. By default lo/hi are both the close; in the high-low method they are the low/high. If the close is higher than the previous upper band, the state becomes upward; if lower than the previous lower band, downward. If both conditions hold, the later downward check takes priority. In the upward state the line is max(lower candidate, previous lower band) + 1 step; otherwise it is min(upper candidate, previous upper band) − 1 step.
The window name and the actual display in the Data Window, and how it looks during long runs on real symbols or with long history, are not yet verified. Input names and calculation conditions are described based on the implementation.