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
MA Cross Arrows
Places arrows on bars where the order of the 2 moving averages, Fast and Slow, switched. A 3rd reference line and alerts for crosses on closed bars can be chosen separately.
Indicator name: MA Cross ArrowsMetaTrader 5Price chart
Records switches in the order of the 2 lines
Schematic diagram of how to read it. This is not an actual terminal screen.
1
Distinguish the 2 linesFast is blue and Slow is orange. The names are roles; the Fast period is not necessarily shorter.
2
Look at the bar where they switchedIf Fast moves from below Slow to above, it is upward; the reverse is downward. Crosses across bars with equal values also count.
3
Keep the 3rd line separateThe gray dotted line is the reference Trend line. It is not used to decide arrows.
Default is closed bars onlyIncludes crosses across equal valuesAlerts 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 period InpFastPeriod5 → 13
Fast method InpFastMethodExponential (EMA) → Simple (SMA)
Slow period InpSlowPeriod8 → 6
Slow price InpSlowPriceOpen → Close
Reference line period InpTrendPeriod20 → 0
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.
Fast = EMA5 of close, Slow = EMA8 of open, Trend = EMA20 of close. The arrows are determined only by Fast and Slow.View the screen in detail at full size
Fast = SMA 13 of close, Slow = EMA 6 of close, and Trend set to 0 to hide it. Even if the order of the periods is the reverse of the default, the roles of Fast and Slow do not change.View the screen in detail at 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
Green upward
A record of the bar where Fast moved from below Slow to above it.
Red downward
A record of the bar where Fast moved from above Slow to below it.
Gray reference line
It can be removed by setting Trend Period to 0. The arrow condition does not change.
3
What it measures
Shows the crossing of the averages and an optional reference line on 1 chart.
Handling equal values
While Fast = Slow, it remembers the previous non-equal order. An arrow is placed on the bar that moves away to the opposite side. If they are equal from the start and there is no order yet, it is not treated as a cross.
No crosses with identical settings
If the period, method and applied price are the same for the 2 lines, they have the same values, and the setting produces no arrows.
Arrows and price
Upward arrows are placed below the low and downward arrows above the high, offset in pixels. The values in the Data Window are the bar's low and high themselves.
Methods and prices
For each line you can choose SMA, EMA, SMMA or LWMA and 7 kinds of applied price. There is no function that automatically reorders the periods.
4
Situations for reading the display
The lines overlap for a while
Indicator
Bars with equal values continue
Cross-check
The previous non-equal relationship
Check
Check the bar that moved away to the opposite side
Caution
A bar that only became equal is not treated as a cross.
An arrow appeared but there was no alert
Indicator
The setting that also shows the forming bar
Cross-check
Closed bars and the Alert setting
Check
Check the latest closed bar
Caution
Alerts are not linked to every arrow on the forming bar.
5
Steps for checking the display
1
Check the inputs of the 2 lines
By default, Fast uses the close and Slow uses the open. Check the applied price, not only the period.
2
Read on closed bars
By default, no arrow is shown on the newest forming bar.
3
Choose only the displays you need
Setting Trend to 0 leaves only the 2 lines. To use alerts, set Alert to true.
6
Installation and checking the package contents
Included file
Purpose / location
TRI_MA_Cross_Arrows.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.
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 12 inputs. Change them on the Inputs tab of the properties window. The English display name and the input name in the code are shown together.
Fast period
Name shown on screen
Fast MA Period
Input name
InpFastPeriod
Default
5
Allowed range
1〜500
Description
Number of bars for the Fast line. It does not need to be less than Slow.
Fast method
Name shown on screen
Fast MA Method
Input name
InpFastMethod
Default
Exponential (EMA)
Allowed range
SMA / EMA / SMMA / LWMA
Description
Averaging method of the Fast line.
Fast price
Name shown on screen
Fast MA Price
Input name
InpFastPrice
Default
Close
Allowed range
Close, open, high, low, median, typical, weighted close
Description
Price used for the Fast line.
Slow period
Name shown on screen
Slow MA Period
Input name
InpSlowPeriod
Default
8
Allowed range
1〜500
Description
Number of bars for the Slow line. It does not need to be longer than Fast.
Slow method
Name shown on screen
Slow MA Method
Input name
InpSlowMethod
Default
Exponential (EMA)
Allowed range
SMA / EMA / SMMA / LWMA
Description
Averaging method of the Slow line.
Slow price
Name shown on screen
Slow MA Price
Input name
InpSlowPrice
Default
Open
Allowed range
Close, open, high, low, median, typical, weighted close
Description
The default is the open.
Reference line period
Name shown on screen
Third MA Period (0 = off)
Input name
InpTrendPeriod
Default
20
Allowed range
0〜500
Description
0 hides it. The reference line is not used for detecting crosses.
Reference line method
Name shown on screen
Third MA Method
Input name
InpTrendMethod
Default
Exponential (EMA)
Allowed range
SMA / EMA / SMMA / LWMA
Description
Averaging method of the Trend line.
Reference line price
Name shown on screen
Third MA Price
Input name
InpTrendPrice
Default
Close
Allowed range
Close, open, high, low, median, typical, weighted close
Description
Price used for the Trend line.
Arrows on closed bars only
Name shown on screen
Closed Bars Only
Input name
InpClosedBarsOnly
Default
true
Allowed range
true / false
Description
If true, the forming bar is excluded. If false, arrows appear and disappear before the bar closes.
Arrow gap
Name shown on screen
Arrow Gap (pixels)
Input name
InpArrowGap
Default
8
Allowed range
0–100 pixels
Description
This is a number of pixels on screen, not a price range.
Cross alert
Name shown on screen
Alert on Closed-Bar Cross
Input name
InpAlert
Default
false
Allowed range
true / false
Description
Default false. If true, a cross on the latest closed bar is notified in English. There is no email or push notification.
8
Usage specifications
Values on the forming bar
The lines change with the current price. With Closed Bars Only=false, arrows may disappear before the bar closes.
Scope of notifications
Past crossings right after attaching are not notified. When a new closed bar is detected, it notifies a crossing on the most recent closed bar 1 time. Even if several bars advance while disconnected, it does not replay notifications for the whole history.
Initial display
EMA has values from the oldest bar; the other methods have values after a period's worth of history. No arrow is placed on the first bar where the 2 lines can both be compared; crossings from the next bar onward are recorded.
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 trade orders. It does not guarantee profit or future price movement.
9
Troubleshooting and usage notes
No arrows
Check that the 2 lines do not have the same settings, that a cross occurred, and that there is enough history. A cross of the reference line alone does not produce an arrow.
Nothing appears after changing settings
Check the allowed ranges of the periods and the pixel offset. With an invalid input the indicator does not start, and the reason is shown in English on the Experts tab.
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
Averages and prices
EMA uses α = 2/(n+1) and starts from the oldest price. SMA is equally weighted, SMMA smooths from an initial SMA, and LWMA weights the latest bars most. Median = (H+L)/2, typical = (H+L+C)/3, weighted close = (H+L+2C)/4.
Arrow conditions
Determined by a change between the sign of Fast−Slow and the previous non-0 sign. The names Slow and Fast alone do not guarantee which period is longer. Alerts always refer to the latest closed bar.