Skip to content
All library documents

Moving Average Position Signals with Fixed Profit and Stop Levels

Article Strategy library · Author: ChaoZhang

Summary

This strategy uses a simple moving average of closing prices to choose a position direction: prices at or above the average indicate long exposure, while prices below it indicate short exposure. A stateful signal filter suppresses repeated signals until the condition changes. The strategy also defines target and stop prices using fixed percentages based on the current price, and its Pine Script example includes order alerts intended for automated execution through a broker integration.

The document describes the approach as a basic trend-following method and notes that moving averages lag turning points. Fixed percentage exits may not adapt to changing volatility, and parameter choices can affect results. It gives a BTC futures backtest configuration but no outcome statistics; the source also characterizes itself as educational and not tested or recommended for live trading. The write-up refers to crossover behavior, although the implementation compares price directly with one moving average. These distinctions matter when reproducing or evaluating the strategy.

Key ideas

  • The strategy takes a long position when closing price is at or above a simple moving average and a short position when it is below.
  • A stateful filter suppresses repeated signals until the direction condition changes.
  • Profit targets and stops are set as fixed percentages relative to price.
  • Broker alert messages are included to support automated order execution.
  • The document provides no performance results and warns that lag and fixed exits can limit the approach.

Tags

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