Skip to content
All library documents

Open-Close Moving Average Cross Signals with Alternate Timeframes

Article Strategy library · Author: ChaoZhang

Summary

This indicator generates directional signals when smoothed price series based on the open and close cross. Users can choose from several moving-average calculations, set the period, and optionally calculate signals on an alternate timeframe defined by a multiplier. A trade-direction setting limits signals to long, short, both, or none; the script also includes inputs for stop and target points and a backtest bar limit.

The source uses crossovers for long signals and crossunders for short signals, then submits strategy entries. Its alternate-timeframe request enables lookahead, which can expose future higher-timeframe values and make historical signals repaint. Although stop-loss and target inputs are present, the source does not attach them to orders, so they should not be treated as functioning exits. The published settings identify a BTC/USDT futures interval, but no performance results are given. The document is best read as a configurable signal example, with meaningful execution and signal-reliability limitations.

Key ideas

  • Long and short signals are based on crossovers between smoothed close and open series.
  • The moving-average method, period, and alternate timeframe can be configured.
  • A trade-direction option can suppress one side of the signals.
  • The alternate-timeframe calculation uses lookahead, which can make historical signals unreliable.
  • Stop-loss and target inputs appear in the source but are not connected to order exits.

Tags

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