# Original Turtles for MT5

`OriginalTurtles.mq5` is an independent implementation of the long and short rules documented by original Turtle Curtis Faith. [The Original Turtle Trading Rules (2003)](https://www.tradingwithrayner.com/wp-content/uploads/2014/11/OriginalTurtleRules.pdf)

1. In MT5, open **File → Open Data Folder**, place the source in `MQL5/Experts`, and compile in MetaEditor with **F7**. The supplied `OriginalTurtles.ex5` targets X64 Regular. Select a **hedging** account in Strategy Tester so each volatility unit can carry its own protective stop. Test with **Every tick based on real ticks** and broker commission, swap, margin and symbol specifications loaded.
2. Set `InpSystem` to `System1` for the 20-day entry, 10-day exit and 55-day fallback after a winning theoretical 20-day breakout. Set it to `System2` for the unfiltered 55-day entry and 20-day exit. Both trade breakouts by one price tick in either direction. S1 positions entered through the fallback retain the S1 exit.
3. `InpUnitPercent=1.0` sizes a one-N move to 1% of notional, subject to rounding down to broker lot steps. A new unit has a 2N stop. Additional units trigger every 0.5N from the actual last fill, and each earlier stop moves 0.5N. Each unit has an individual stop, which preserves differences after a gap. A channel exit closes all remaining units. The EA freezes the campaign N at its initial entry. By default the new campaign N is set on the first session of the broker week from completed D1 bars. Switch `InpWeeklySizingSheet` off to recalculate N each session.
4. The maximum per symbol is four. For multiple live or demo charts cooperating in the same terminal, use the same magic for all symbols in the coordinated set, one EA per symbol, and enter exact broker symbol names in the comma-separated close and loose groups on each applicable chart. Limits are six same-direction units for the configured close group, ten for the configured loose group and a default twelve in one direction across the common magic. Use separate magic values for independent campaigns. Caps cannot coordinate accounts, terminals, or magic values. Ordinary MT5 Tester runs cover the chart symbol only.
5. The default annual anchor is the first observed closed balance for the broker calendar year, multiplied by `InpAccountAllocation`. `InpYearNotional` can set an explicit base notional in account currency. The automatic reduction applies successive 20% cuts at losses of 10% of the then-current virtual size and maintains the reduction until the annual balance anchor is recovered. Account-level cash flows and unrelated trades affect this balance-based approximation. A new calendar year reanchors the rule.

The EA defaults to Strategy Tester only. Outside the tester it requires `InpAllowOrdersOutsideTester=true` and enabled MT5 order permissions. Stops already placed with the broker remain in effect when the EA is offline. With missing position state after a restart it manages existing stops and channel exits and freezes additions until the campaign ends.

The rules use the broker's own daily session boundary and chart quote mode. The S1 theoretical filter is initialized from the earlier available D1 bars, then updated on ticks. During the D1 initialization, days with both entry barriers touched and no gap direction are skipped and a same-day adverse touch is treated as entry before exit. This can differ from a continuous historical replay. Fills use actual bid/ask market orders, and a rejected broker update can cause the EA to close the campaign. The release was compiled in MetaEditor with zero errors and warnings. Broker Strategy Tester performance and exact parity with the separate Python study have not been established.
