# P4PatternStrategy

Detects P4 patterns and trades based on them with dynamic stop-loss and take-profit.

Canonical: https://prismaticalgos.com/compendium/algo/11860-p4patternstrategy
Record ID: 11860
Catalog rank: 1170 (reading order, not performance)
Snapshot: 2026-10-31 15:46 UTC
Family: Risk, Money Management & Portfolio Overlays (J)
Source: https://github.com/junthy-me/MT5TradeAlgo
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

Opacity warnings: PARTLY OPAQUE ENTRY: 0.5 of 8 entry conditions reference a value the source never published. The rest is specified.

## Recorded profile

- symbols: XAUUSDm
- timeframes: M30
- sessions: any
- market_regime: any

## Indicators

No indicator stack recorded.

## Recorded long-entry rules

- b1 / b2 >= InpCondAXMin
- a >= InpP1P2AValueSpaceMinPriceLimit
- pointSpans[1] + 2 >= InpP1P2AValueTimeMinKNumberLimit
- b1 + b2 >= InpBSumValueMinRatioOfAValue * a
- b1 + b2 <= InpBSumValueMaxRatioOfAValue * a
- Pre0 -> P0 move > InpPreCondPriorMoveMinRatioOfStructure * (a + b1 + b2)
- Pre0 and P0 are separated by at least InpPreCondPriorMoveMinBarsBetweenPre0AndP0 bars
- InpRequiredSwingExtremaSegments_Pre0P0_P0P1_P1P2_P2P3_P3P4 is true for Pre0P0 and P0P1 and P1P2 and P2P3 and false for P3P4

## Recorded short-entry rules

- ...

## Recorded exit rules

- ...

## Recorded filters

- InpMaxPositionsPerSymbol
- InpMaxProfitStopMoney
- InpMaxLossStopMoney

## Risk controls

- Stop loss: P0
- Take profit: First P5/P6 after entry
- Position sizing: InpFixedLots
