# MA Stop Loss

Sets stop loss based on moving average with a minimum distance and a maximum loss threshold.

Canonical: https://prismaticalgos.com/compendium/algo/3324-ma-stop-loss
Record ID: 3324
Catalog rank: 2676 (reading order, not performance)
Snapshot: 2026-10-31 15:46 UTC
Family: Trend Following & Directional (A)
Source: https://www.prorealcode.com/topic/stoploss-on-a-moving-average/
Evidence label (unverified): source_code

## Scope and limitations

These are machine-extracted research records, not verified trading systems. Catalog rank measures specification detail and claimed evidence, not profitability. The catalog extraction pipeline did not independently backtest these records. Its separate selected testing ledger does not validate the wider corpus. Rules, labels and parameters can be incomplete or wrong; consult the original source and its reuse terms.

No endorsement, ownership claim or source-code reuse permission is implied.

## Extraction warnings

No automated warnings recorded; this is not validation.

## Recorded profile

- symbols: any
- timeframes: M1
- sessions: any
- market_regime: any

## Indicators

- MA: {"period": 20}; applied to: close

## Recorded long-entry rules

- close CROSSES OVER average[20,0](close)

## Recorded short-entry rules

- close CROSSES UNDER average[20,0](close)

## Recorded exit rules

- if LongOnMarket THEN SL = max(SL, MA - 4*PipSize)
- if ShortOnMarket THEN SL = min(SL, MA + 4*PipSize)
- if abs(SL - TradePrice) > 50*PipSize THEN SET STOP %LOSS 0.25
- else SET STOP PRICE SL

## Recorded filters

- Not specified.

## Risk controls

- Stop loss: MA - 4*PipSize for long, MA + 4*PipSize for short, with a max loss of 0.25% if the distance is greater than 50 pips
- Take profit: Not specified
- Position sizing: Not specified
