Loading…

Swing Cycle Period Lines

Markets do not turn on a fixed schedule, but many instruments show a rough, repeating rhythm between meaningful swing lows - not exact enough to trade blind, but consistent enough to be worth marking. This indicator finds every confirmed fractal swing low (the lowest point within K bars on both sides), measures how many bars separate each consecutive pair, and projects the typical spacing forward from the most recent confirmed low as a handful of vertical dotted lines. The typical spacing is a median of the most recent intervals, not a mean, on purpose. A single unusually long or short gap - a news spike, a holiday-thin session - skews a mean hard but barely moves a median, so the projected spacing stays anchored to the market's normal rhythm instead of its one outlier. The projected lines are a moving estimate, not a prediction with a strike time. They shift forward and can shrink or stretch every time a new swing low confirms and feeds the median - that is the intended behaviour, a running best guess, not a fixed forecast that should be expected to hold unchanged. Notes and limitations - This is a statistical rhythm read, not a cycle-theory prediction - it has no view on direction, only on roughly when the next turn might sit. - Every confirmed swing sits InpK bars behind the live edge by construction, and the projection itself only updates when a new swing confirms, not on every tick. - Needs at least two confirmed swing lows in the lookback window before anything is projected; on a short or very quiet chart history that may never happen. - Chart objects are prefixed and removed cleanly in OnDeinit, so removing the indicator leaves nothing behind on the chart.

Indicator · MT5 · v1.0 · Free

About Swing Cycle Period Lines

Swing Cycle Period Lines is an indicator for MetaTrader 5. It draws buy and sell arrows on the chart. It has 4 settings, such as K, Lookback swings and Projections forward. MQL source code included.

Files in the download: SwingCyclePeriodLines.ex5, SwingCyclePeriodLines.mq5, SwingCyclePeriodLines.txt.

Settings

SettingDefaultWhat it does
K3Bars required on each side to confirm a swing low
Lookback swings8Most recent confirmed intervals used for the median
Projections forward3How many future turning-window lines to draw
Projection colorclrDarkOrchidColour of the projected vertical lines

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Fractals · Buy/Sell Arrows · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria