MA Price Display
MA & Price Display is a lightweight and user-friendly indicator designed to show key market information directly on your chart. It displays the current values of two moving averages (default periods 5 and 10) and the previous candle's high and low, helping you quickly assess market structure without switching windows.
Key Features
-
Real‑time display of MA(5) and MA(10) values using closing prices.
-
Shows the previous candle’s high and low – useful for support/resistance and breakout trading.
-
Fully customizable appearance: font size, colors for MA and high/low lines can be set independently.
-
Mouse‑draggable text: simply hold the left button on either text line and move it to any chart position (can be disabled in parameters).
-
Works on all timeframes and symbols (Forex, indices, commodities, cryptocurrencies, stocks).
-
No external dependencies – pure MQL5 code, no DLLs, no restrictions.
Input Parameters
-
InpFontSize – Font size in pixels (default 10).
-
InpColorMA – Color of the moving average text (default red).
-
InpColorHL – Color of the previous high/low text (default blue).
-
InpXOffset / InpYOffset – Initial position of the text block from the top‑left corner of the chart.
-
InpDigits – Number of decimal places shown (-1 = use symbol digits).
-
InpMAPeriod1 / InpMAPeriod2 – Periods of the two moving averages (default 5 and 10).
-
InpEnableDragging – Enable or disable mouse dragging (true/false).
How to Use
-
Attach the indicator to any chart.
-
The information is updated automatically on every tick.
-
To reposition the text block, ensure dragging is enabled ( InpEnableDragging = true ), then click and hold the left mouse button on either text line and drag to the desired location.
-
Release the mouse button to fix the text at the new position.
Note
-
The indicator does not repaint or provide trading signals – it is a pure information tool.
-
All parameters can be adjusted after attaching, except the dragging feature which requires the indicator to be re‑attached for initial position changes.
