Definition: what “inputs” mean here
Swing Definition is a rules-based way to decide what counts as a swing move in a price series (for example, a rise that qualifies as a swing high and a drop that qualifies as a swing low). In this context, “inputs” are the data you feed into the rule and the parameters you set so the rule can label swing points and connect them into a swing sequence.
A useful way to be precise is to separate three layers:
- Stable mechanics: the general logic of how swings are identified.
- Your parameters: numeric choices that change outcomes (such as window length or confirmation requirements).
- Variable conditions: market movement, data quality, and transaction costs that affect realized outcomes.
Inputs Swing Definition uses
1) Price data (data source and format)
The most fundamental input is a price series. Typical inputs are:
- Instrument prices (e.g., a chosen currency pair).
- Time spacing (e.g., candles/bars at a fixed timeframe).
- OHLC fields (open, high, low, close) depending on how the swing rule is written.
If your rule uses highs and lows to label swing points, then the input must include at least those high/low values. If it uses close prices to confirm, then close becomes a required input.
2) The swing rule itself (logic)
Swing Definition uses a swing-identification logic. That logic is an input because different rules produce different swing labels even on the same price series. Common elements include:
- A condition for a swing high (for example, being higher than neighboring points by some rule).
- A condition for a swing low.
- A method to avoid labeling every small fluctuation as a swing.
In plain terms: the rule tells the system what “counts” as a swing.
3) Parameter values (what you choose)
Parameters turn the swing logic into something operational. Examples of parameter types include:
- Lookback / neighborhood size: how many surrounding points must be exceeded (or not exceeded).
- Confirmation or filtering: whether the rule requires multiple bars/events after the candidate swing point.
- Minimum swing size: a threshold to ignore tiny moves.
- Mapping rule: how swing points are converted into implied “phases” (rise vs. fall) for any further reasoning.
Even if the mechanics stay the same, changing these values changes outputs.
4) Time context (which timeframe you label on)
Swing Definition is often timeframe-dependent. The input includes the time horizon you are labeling (for example, the timeframe of the bars you use). A swing on one timeframe may break apart into smaller oscillations on another.
5) Assumptions for any example calculations
If you walk through an example, the rule needs explicit assumptions. Typical assumptions are:
- Which candle close is considered “available” for confirmation.
- Whether you assume ideal fills at an observed price or a realistic fill at some other price level.
- Whether spreads, slippage, and commissions are treated as zero or non-zero.
Assumptions matter because swing labels alone do not determine realized results without a defined execution mapping.
How it works (simple model)
A straightforward way to check understanding is to imagine this pipeline:
- Select a price series and timeframe (input data).
- Apply the swing rule’s high/low logic (stable mechanics).
- Apply your chosen parameters to filter and confirm swing points.
- Output swing points (and possibly swing phases).
If you then add a second layer (such as measuring distances between swing points), those measurements are new computations with their own inputs (the coordinates of swing points) and assumptions (how you compute distances and when points are known).
Evidence / example (with explicit assumptions)
Consider a generic example where your swing rule defines a swing high as a point whose high value is greater than the highs of surrounding points within a fixed neighborhood. Inputs would be:
- price highs from the selected timeframe,
- the neighborhood size parameter,
- confirmation logic (if any),
- and the timeframe choice.
Assumptions for the example:
- You evaluate the rule using historical data only.
- You treat each bar as providing a known high/low once that bar is complete.