Triple MovingAvarage fractal MA Cross alert
- 지표
- 버전: 3.18
- 활성화: 5
TrendFraMA (v3.18) — Indicator Description & Input Guide
Overview
TrendFraMA is a chart-window indicator that combines three configurable Moving Averages (MA1, MA2, MA3) with a Fractals overlay (swing highs and swing lows marked by arrows). It is designed to visualize trend direction (via the three MAs) and short-term reversal/structure points (via the fractals). It is a visual analysis tool only — it does not trade.
The MA layers commonly work as a "fan" system:
· MA1 (fast) — reacts quickly to price; identifies short-term momentum.
· MA2 (medium) — intermediate trend.
· MA3 (slow) — dominant/long-term trend.
Crossovers between MA1 and MA2 trigger an optional sound alert on bar close.
Below is an explanation of only the inputs visible in the parameter dialog.
---
🟩 Group: MA 1 Parameters
MA1_Period (default: 6)
· Function: Number of bars used in the fast moving average calculation.
· Use: Smaller = more sensitive to price action; larger = smoother, slower.
MA1_Shift (default: 0)
· Function: Horizontal shift of the MA1 line in bars (positive = shifted forward/right; negative = shifted backward/left).
· Use: Fine-tune visual alignment with other tools, or create a shifted overlay for comparison.
MA1_Method (default: MODE_SMMA)
· Function: Type of moving average calculation for MA1.
· Options:
· MODE_SMA — Simple Moving Average (equal weight).
· MODE_EMA — Exponential Moving Average (recent bars weighted more).
· MODE_SMMA — Smoothed Moving Average (slow, very smooth).
· MODE_LWMA — Linear Weighted Moving Average (steep weighting).
· Use: SMMA is smoother and slower — good for trend; EMA/LWMA react faster for entries.
MA1_Price (default: PRICE_MEDIAN)
· Function: Applied price used for MA1.
· Options: PRICE_CLOSE, PRICE_OPEN, PRICE_HIGH, PRICE_LOW, PRICE_MEDIAN (H+L)/2, PRICE_TYPICAL (H+L+C)/3, PRICE_WEIGHTED (H+L+2C)/4.
· Use: Median reduces noise from close-only fluctuations; typical/weighted put more emphasis on close.
---
🟩 Group: MA 2 Parameters
MA2_Period (default: 11)
· Function: Number of bars for the medium moving average.
· Use: Typically set between MA1 and MA3 to form a "trend ladder."
MA2_Shift (default: 0)
· Function: Horizontal shift of MA2 in bars.
· Use: Cosmetic/comparative alignment.
MA2_Method (default: MODE_SMMA)
· Function: Type of MA calculation for MA2 (SMA / EMA / SMMA / LWMA).
· Use: Keep consistent with MA1/MA3 for a clean fan, or mix to change sensitivity.
MA2_Price (default: PRICE_MEDIAN)
· Function: Applied price used for MA2.
· Use: Same options as MA1; consistency across MAs is recommended.
---
🟩 Group: MA 3 Parameters
MA3_Period (default: 47)
· Function: Number of bars for the slow moving average.
· Use: Defines the dominant/background trend. Larger = more stable trend signal.
MA3_Shift (default: 0)
· Function: Horizontal shift of MA3 in bars.
· Use: Cosmetic/comparative alignment.
MA3_Method (default: MODE_SMMA)
· Function: Type of MA calculation for MA3.
· Use: SMMA is very smooth — well suited to being the "anchor" of a trend system.
MA3_Price (default: PRICE_MEDIAN)
· Function: Applied price used for MA3.
· Use: Consistency with MA1/MA2 recommended.
---
🟩 Group: Cross MA 1&2 Notification Settings
EnableSound (default: false)
· Function: Master toggle for the sound alert that fires when MA1 crosses MA2.
· Use: Enable to be notified on bar close of trend shifts between fast and medium MAs.
· Note: The alert only fires once per closed bar (checked against time[1]), avoiding repeated sounds within the same bar.
SoundFile (default: "request.wav")
· Function: Filename of the sound played on MA1/MA2 cross.
· Use: Replace with any .wav file placed in the MQL5/Files or Sounds folder (e.g., alert.wav, news.wav).
· Note: Ignored if EnableSound = false or the filename is empty.
---
🟩 Group: Fractal Parameters
ShowFractals (default: true)
· Function: Master toggle for drawing fractal arrows on the chart.
· Use: Disable if you want a "pure MA" view without swing markers.
FractalBars (constant: 2 — not user-editable)
· Function: Number of bars on each side required to confirm a fractal (fixed at 2, matching the classic Fractals indicator).
· Note: This is a const in the code — not visible in the dialog. Mentioned only for completeness.
FracHighColor (default: clrLightCoral)
· Function: Color of the arrow drawn at a fractal high (swing high).
· Use: Make swing highs visually distinct from swing lows.
FracLowColor (default: clrDarkSeaGreen)
· Function: Color of the arrow drawn at a fractal low (swing low).
· Use: Distinguish swing lows from swing highs.
FractalArrowSize (default: 1)
· Function: Thickness of the fractal arrow glyph (clamped between 1 and 5).
· Use: Increase for visibility on high-DPI screens.
FractalArrowShift (default: 15)
· Function: Pixel offset of the fractal arrows so their tip touches the candle high/low precisely.
· Direction:
· Fractal high arrows are shifted upward (negative offset) so the triangle's bottom tip touches the high.
· Fractal low arrows are shifted downward (positive offset) so the triangle's top tip touches the low.
· Use: Increase if arrows overlap the candle body; decrease if they drift too far from the wick.
---
💡 Practical Recommendations
· Trend-following setup: Keep MAs at default periods; watch for price above all three MAs (bullish bias) or below all three (bearish bias).
· Entry trigger: Use MA1/MA2 cross alert on bar close as an early shift signal, confirmed by MA3 direction.
· Swing trading: Enable ShowFractals and use fractal highs/lows as structure references or SL placement points.
· Fast scalping: Lower all three MA periods (e.g., 3/8/21) and use MODE_EMA for quicker reaction.
· Smooth positional view: Use higher periods (e.g., 10/20/100) with MODE_SMMA for a stable trend backdrop.
· Alert file tip: Make sure SoundFile matches a real filename — MT5 is case-sensitive on some systems, and unknown files simply produce no sound (no error).
---
