Skip to content
All library documents

SMA Crossover Trend Trading with Adjustable Leverage

Article Strategy library · Author: imthetradingdoge

Summary

This strategy uses a simple moving average to generate trend-following entries. A close crossing above the average signals a long entry, while a cross below signals a short entry. The script allows both directions, long-only, or short-only operation; in one-sided modes, the opposite signal closes the open position without entering the other side.

Position quantity is based on current strategy equity, the selected side’s leverage setting, and closing price. Long and short leverage are configured independently. The displayed defaults include an SMA length of 44 and leverage settings of 2x long and 1x short, though these are inputs rather than demonstrated optimal values. The document describes chart visuals and signal logic but supplies no backtest results, asset-specific validation, or transaction-cost analysis. Its overview presents the approach as suitable for daily Bitcoin charts while also saying it can be adapted, so performance across markets and timeframes remains unestablished.

Key ideas

  • A close crossing above the SMA triggers a long signal, and a crossing below triggers a short signal.
  • Trade direction can be set to both sides, long only, or short only.
  • Long and short position sizes use separate leverage inputs applied to strategy equity.
  • The script provides no performance evidence establishing effective SMA settings or leverage.

Tags

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