Files
conversation-history/Trading/MT5/2026-04-23 OrdersEA Smart Grid - Fix Checklist.md
T

68 lines
2.8 KiB
Markdown

# 2026-04-23 OrdersEA Smart Grid - Fix Checklist
This is a concrete follow-up checklist derived from the read-only code review. No code changes have been made yet.
## Immediate
- [ ] Normalize live presets so `GetOut` is valid on every active chart.
- [ ] Verify live chart `MagicNum` values match intended pair presets.
- [ ] Confirm whether the EA should keep stacking same-side levels after first fill, or intentionally stop after first fill per side.
- [ ] Keep `InpUseBreakeven=false` on live charts until breakeven behavior is intentionally redesigned and retested.
## Code Fixes
### 1. Preset semantics
- [ ] Fix preset usage so `GetOut=Y` is not used as a safety toggle.
- [ ] Decide whether `GetOut` should remain a shutdown input only, or whether a separate boolean safety flag is needed.
### 2. Grid lifecycle logic
- [ ] Review same-side pending-order cancellation logic in `OnTick()`.
- [ ] Align the implementation with the intended strategy:
- classic multi-level averaging grid, or
- one-fill-per-side range system.
- [ ] Update comments so they match actual behavior.
### 3. P&L isolation
- [ ] Remove whole-account contamination from daily drawdown baseline.
- [ ] Remove whole-account contamination from weekly drawdown baseline.
- [ ] Remove whole-account contamination from `cycleStartEquity`.
- [ ] Remove whole-account contamination from `InpStopAfterProfit`.
- [ ] Remove whole-account contamination from `CheckProfitTarget()`.
### 4. Breakeven redesign
- [ ] Decide what breakeven should actually mean:
- true breakeven,
- spread-protected breakeven,
- or partial profit lock.
- [ ] Add broker-rule checks before `PositionModify()`.
- [ ] Add per-ticket retry backoff so rejected modifications do not flood logs.
### 5. Filter relaxation
- [ ] Change adaptive relaxation to consider “no grid placed” rather than only `lastTradePlacedTime`.
- [ ] Confirm whether symbols that never traded should still relax after N idle days.
## Preset Modernization
- [ ] Add session filter settings to older presets.
- [ ] Add spread caps to older presets.
- [ ] Add correlation cap settings to older presets.
- [ ] Add explicit breakeven settings to older presets.
- [ ] Add explicit adaptive-filter settings to older presets.
- [ ] Review whether `BaseEquity=10000` should remain the standard preset default.
## Validation
- [ ] Re-run preset audit after edits.
- [ ] Re-check live charts in MT5 to confirm loaded settings match repo presets.
- [ ] Watch logs for:
- invalid stops
- repeated modify failures
- unexpected GetOut shutdowns
- mismatched MagicNum usage
## Decision Points
- [ ] Choose the intended OrdersEA model: true grid vs limited range system.
- [ ] Decide whether session filter should be default ON for all grid presets.
- [ ] Decide whether per-cycle logic should use balance-based or EA-isolated P&L tracking.