Skip to content
All library documents

Long-Only Momentum Entries and Exits with Zero-Line Signals

Article Strategy library · Author: felipecms14

Summary

This strategy takes long positions when two momentum measures are positive and exits when both are negative. It calculates momentum either as a percentage change over a chosen lookback or as an absolute price difference. The user can select a one-bar momentum measure or momentum applied to the longer-lookback measure, and orders are placed as stop entries just beyond the current bar’s high or low.

The script restricts entries to long positions and lets users set a date window for strategy evaluation. It also includes alert message fields for buy and sell orders. The accompanying description says checking that conditions remain true when alerts launch can help align backtests with live signals, and advises including commission and slippage when assessing performance. No performance results are reported, so profitability is not established; the selectable calculations and alert behavior should be evaluated on the intended market and timeframe.

Key ideas

  • Long entries require both selected momentum measures to be above zero.
  • Long positions are exited when both measures are below zero.
  • Momentum can be expressed as a percentage change or an absolute price difference.
  • Stop entries are placed above the bar high for buys and below the bar low for exits.
  • Date filters and configurable alert messages support testing and automation.

Tags

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