# Trailing Stop

Trailing stop updates position every 10 pips and then increments every 6 pips if in profit.

Canonical: https://prismaticalgos.com/compendium/algo/3367-trailing-stop
Record ID: 3367
Catalog rank: 2564 (reading order, not performance)
Snapshot: 2026-10-31 15:46 UTC
Family: Trade & Execution Management (K)
Source: https://www.prorealcode.com/topic/trailing-stop-non-funziona/
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: CAC40
- timeframes: 1 Hour, 30 minutes
- sessions: 08:00-09:00 GMT
- market_regime: any

## Indicators

No indicator stack recorded.

## Recorded long-entry rules

- IF Time = 080000 AND not OnMarket THEN COMPRA = Highest[7](high[1]) + 5*pipsize; BUY 1 CONTRACT AT COMPRA STOP

## Recorded short-entry rules

- Not specified.

## Recorded exit rules

- IF LongOnMarket AND close > (TradePrice + (y1 * pipsize)) THEN x1 = (close - tradeprice) / pipsize; IF x1 >= TrailStart THEN Diff1 = abs(TrailStart - x1); Chunks1 = max(0,round((Diff1 / StepSize) + RoundTO)); ProfitPerCent = BasePerCent + (BasePerCent * (Chunks1 * PerCentInc)); y1 = max(x1 * ProfitPerCent, y1); IF y1 THEN SellPrice = Tradeprice + (y1 * pipsize); IF abs(close - SellPrice) > PriceDistance THEN IF close >= SellPrice THEN SELL AT SellPrice STOP ELSE SELL AT SellPrice LIMIT ENDIF ELSE SELL AT Market ENDIF ENDIF
- IF ShortOnMarket AND close < (TradePrice - (y2 * pipsize)) THEN x2 = (tradeprice - close) / pipsize; IF x2 >= TrailStart THEN Diff2 = abs(TrailStart - x2); Chunks2 = max(0,round((Diff2 / StepSize) + RoundTO)); ProfitPerCent = BasePerCent + (BasePerCent * (Chunks2 * PerCentInc)); y2 = max(x2 * ProfitPerCent, y2); IF y2 THEN ExitPrice = Tradeprice - (y2 * pipsize); IF abs(close - ExitPrice) > PriceDistance THEN IF close <= ExitPrice THEN EXITSHORT AT ExitPrice STOP ELSE EXITSHORT AT ExitPrice LIMIT ENDIF ELSE EXITSHORT AT Market ENDIF ENDIF ENDIF

## Recorded filters

- Not specified.

## Risk controls

- Stop loss: SET STOP pLOSS 70
- Take profit: Not specified
- Position sizing: Not specified
