Skip to content
All library documents

Interpreting the _Cross Indicator Crossover Function

Article FMZ digest · Author: 发明者量化-小小梦

Summary

This note explains how the _Cross function reports the relative state of two numeric indicator arrays and the number of bars since their latest crossover. It describes the scan from the newest observations backward, stopping when it encounters equal values, nonnumeric values, or a change in the ordering of the two series. A positive or negative result indicates the direction of the crossing relative to the order of the arguments.

The sign convention reverses when the fast and slow series are passed in the opposite order, so users should interpret the result in light of which array represents which indicator. The example compares two series and reports a crossover three bars earlier, illustrating both argument orders. The article is a basic API explanation rather than a tested trading strategy; it does not assess signal profitability, handling of missing data beyond stopping the scan, or how crossover signals should be used in a broader system.

Key ideas

  • The function compares two equal-length indicator arrays and returns a signed count of bars since their crossover state.
  • Positive and negative results describe opposite relative orderings, with their interpretation depending on the argument order.
  • The scan stops at equality, nonnumeric data, or the point where the series ordering changes.
  • Treat the return value as an indicator-state utility, not evidence that a crossover strategy is profitable.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.