Commit Graph
60 Commits
Author SHA1 Message Date
garfieldandClaude Fable 5 e2fbe0d01d Monday start-time A/B: B-cohort (GBPUSD USDJPY EURCHF AUDUSD GBPJPY EURGBP) resumes Monday at 10:00 server (3am ET / London open)
Twin-matched split vs A-cohort at 7:00 (midnight ET). 4-Monday experiment
starting Jul 20; pre-registered decision rule in the vault note.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 07:10:18 -04:00
garfieldandClaude Fable 5 342069ac98 v5.5: hourly heartbeat log line above all gates
The ea-watchdog inferred tick starvation from expert-log silence, but a
stable placed grid is also silent — it restart-looped the container 11
times on Jul 15-16. The heartbeat fires on any tick once per hour before
every gate (weekend block, stand-down, drawdown), so silence >1h during
market hours now unambiguously means a dead chart feed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 00:42:40 -04:00
garfieldandClaude Fable 5 d308697fd3 v5.4: FX trail start 1000 -> 500 pts (metals keep 1000)
100 pips was reachable on metals only — FX winners kept cycle-closing
before the trail engaged (GBPUSD +70 pips Jul 15 had an unmoved SL).
Input renamed InpTrailStart -> InpTrailStartPoints so every chart picks
up the new 500 default on recompile without per-chart preset reloads;
metal presets set it back to 1000 explicitly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 12:44:50 -04:00
garfieldandClaude Fable 5 f6120214ab XAGUSD: raise spread cap to 60pts — live silver spread (43-53) never passed the default 30, EA was permanently blocked
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 10:41:48 -04:00
garfieldandClaude Fable 5 8f60e362c5 v5.3: Monday morning stand-down until 07:00 server
Monday's pivots and ATR are built from Friday's session and the first
server hours are the thin Sunday-evening ET market — historically the
only losing weekday (-$121 across 204 trades vs all other days
positive). New CheckMondayStandDown() blocks new grids on Monday
before InpMondayStartHour (default 7 = midnight ET), and because it
sits above the daily pivot recalc, Monday's pivots/ATR are sampled at
the resume hour instead of the rollover. All 17 presets set
InpMondayStartHour=7. Trading week is now Mon 00:00 ET -> Fri 00:00 ET.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 18:18:50 -04:00
garfieldandClaude Fable 5 29baa17897 v5.2: hold weekend block all Friday + close by Thu midnight ET
CheckWeekendProtection previously returned true after the one-shot
weekend close, so the EA resumed placing new grids for the rest of
Friday. Now it stays blocked until the next trading day and keeps
sweeping stray positions/pendings while blocked.

All 17 presets: InpWeekendCloseHour 17 -> 7 (server UTC+3), closing
everything at Friday 07:00 server = Thursday midnight ET, per the
no-weekend-carry policy.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 11:57:55 -04:00
garfieldandClaude Sonnet 4.6 0175a6edff Add trailing stop to BO EA v5.1 — all 17 presets enabled
ApplyTrailingStop() runs every 5s on open positions: activates after
1000 pts (100 pips) of profit, trails SL 500 pts (50 pips) behind price.
SL only moves in the profitable direction, never backwards.

New inputs: InpUseTrailingStop, InpTrailStart, InpTrailStop (all presets
set to true/1000/500). EA version bumped 5.0 → 5.1.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 02:44:24 -04:00
garfieldandClaude Sonnet 4.6 bae25d07eb Scale BO EA lot sizes to 1.00 (100x original baseline)
0.10 -> 1.00 across all 17 set files. At last week's performance
this projects to ~+$7,600 net on a good trending week.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 09:50:58 -04:00
garfieldandClaude Sonnet 4.6 1db72f6885 Scale BO EA lot sizes 10x: 0.01 -> 0.10 across all presets
Uniform increase on all 17 set files (14 per-pair + 3 templates).
At 0.10 lots last week's +$76 net would have been ~+$760.
SL exposure also 10x: AUDNZD/majors ~$10/hit, volatile pairs ~$27/hit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 09:43:13 -04:00
garfieldandClaude Sonnet 4.6 3d6a0df209 Add OrdersEA_Smart_Grid_BO v5.0 — breakout EA and per-pair presets
Breakout variant of the Smart Grid: uses BUY_STOP/SELL_STOP orders
above resistance and below support rather than mean-reversion limits.
Only trades when trending (ADX filter inverted vs. Grid EA), cancels
orders when market returns to range. Mandatory SL on all presets.

Includes 17 .set files: 3 templates (major/volatile/steady) and 14
per-pair presets covering all Grid EA pairs plus EURCHF, EURGBP,
AUDNZD, XAUUSD, XAGUSD.

First live week (Jun 22–26): +$84.71 from 8 completed cycles.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 13:29:49 -04:00
garfield 0894d18db4 WIP: 6+ weeks of uncommitted EA development and preset tuning
Confluence EA (v1.16 → v1.20):
- Per-EA realized P&L tracking via history deals
- Weekly drawdown protection
- Warmup bars, pivot cache, state persistence
- Point-scaled pivot thresholds, ranging ATR factor
- Market filling mode helper per symbol

Grid EA (v3.1 → v4.1):
- Adaptive filters, adaptive entry, spread filter
- Session filter, breakeven, correlation caps, range drift
- Profit protection (stop-after-profit, cycle reports)
- Edge cleanup v5.0 — close wrong-side positions outside grid
- Master one-shot shutdown, grid state persistence

Presets:
- Fix GetOut=Y shutdown bug on 4 grid presets
- Relax ADXMax 18→40, widen RSI 20/80 across grid presets
- Standardize daily drawdown 3%→5%, add weekly 10%
- Increase grid lots 0.01→0.03
- Normalize confluence ATR thresholds per pair
- Add XAGUSD, EURCHF, EURGBP, AUDNZD presets

Docs & DevOps:
- April 23 audit files (preset mismatch, code review, checklist)
- n8n workflow and validation infrastructure updates
- AI agent analyses in notes/

Known issues carried forward:
- Shared drawdown budget contamination (both EAs)
- Confluence ranging-market threshold inversion
- Older grid presets missing v4.1 safety controls
2026-05-12 09:02:25 -04:00
garfield b9b4e2b22b Fix SSH port to 2222; add HTTP validation server as alternative 2026-03-30 19:11:04 -04:00
garfield c4c57a1dab Add SSH-based n8n workflow to run validate-settings.sh 2026-03-30 18:16:06 -04:00
garfield 61a96d490c Add alternative validation methods: SSH, HTTP, and Python script with Telegram 2026-03-30 15:38:05 -04:00
garfield d0fca63be2 Add n8n workflow setup documentation 2026-03-30 13:08:42 -04:00
garfield 0719ecdc4d Add n8n workflow and validation script for settings monitoring; fix missing weekend protection params 2026-03-30 13:08:12 -04:00
garfield 0d026d5573 Fix Confluence EA settings - wrong variable name, too restrictive filters 2026-03-30 08:40:44 -04:00
garfield a766263ec5 v1.16: Add weekend protection to Confluence EA 2026-03-30 08:36:25 -04:00
garfield 53171c3c36 v1.15: Add trailing stop implementation to Confluence EA 2026-03-30 08:31:28 -04:00
garfield baaac18b84 Add comprehensive documentation for AI handoff
- AGENTS.md: Technical context for AI assistants
- QUICKREF.md: Quick reference card
- README.md: Updated with version history and performance
- conversation-history/README.md: Updated session index
- 2026-03-30-weekend-gap-short-signal-fix.md: Session notes
2026-03-30 00:22:17 -04:00
garfield 24f3d09c96 Fix: make gridPlaced global so CheckWeekendProtection can access it 2026-03-29 23:59:13 -04:00
garfield 028a41b9b5 Fix: remove abovePivot/belowPivot debug references 2026-03-29 23:51:58 -04:00
garfield c53dff6d9f Fix weekend gap risk and short signal detection
Grid EA (v3.1):
- Add weekend protection: close positions Friday before market close
- New settings: InpCloseBeforeWeekend, InpWeekendCloseHour, InpCancelPendingBeforeWeekend
- Prevents gap risk when market reopens Sunday/Monday
- FIX: Restore missing #include statements

Confluence EA (v1.14):
- Fix short signal detection by removing restrictive 'belowPivot' check
- Mirror BUY and SELL logic for symmetry
- Relax harmonic pattern tolerances (0.3-1.0 vs 0.5-0.8)
- Short signals now match buy signal generation

Add verify-short-signals.py to test short signal generation
2026-03-29 23:46:01 -04:00
garfield ac32303eeb Session Save 2026-03-29: Complete EA analysis, bug fixes, and 24 settings files documentation 2026-03-29 23:03:39 -04:00
garfield ab710633c0 Add Confluence EA settings for GBPJPY (The Beast) - extreme volatility warnings 2026-03-29 22:58:11 -04:00
garfield 57107aac08 Add specific Grid EA settings for EURUSD, USDJPY, GBPUSD, GBPJPY 2026-03-29 22:53:21 -04:00
garfield 3f64e34522 Add complete .set files for all major pairs: USDCAD, AUDUSD, NZDUSD, USDCHF, XAUUSD Grid 2026-03-29 22:49:09 -04:00
garfield 044b047f6c Add EURJPY settings for Confluence EA and Grid EA 2026-03-29 22:43:03 -04:00
garfield 8457079306 Add comprehensive .set files for Confluence EA and Grid EA by pair type 2026-03-29 22:37:49 -04:00
garfield 2a8ef3f0d2 Fix HIGH/LOW input variable scope - use InpManualHigh/Low for inputs and GridHigh/Low for runtime 2026-03-29 22:32:29 -04:00
garfield 3971dbd2b3 Rename HIGH/LOW to InpHigh/InpLow to avoid MQL5 constant conflict 2026-03-29 22:28:14 -04:00
garfield 16b69d251c Fix warningPrinted scope - restructure CheckDailyDrawdown function 2026-03-29 22:27:13 -04:00
garfield 04756ef2bd Fix warningPrinted scope error - move declaration to function level 2026-03-29 22:23:35 -04:00
garfield 2f8c24a5d2 MultiSignal Confluence EA v1.13 - Add dynamic lot sizing
New Features:
- InpUseRiskPercent: Enable risk-based lot sizing
- InpRiskPercent: Risk % per trade (default 1.0%)
- CalculateLotSize(): Dynamic lot calculation based on:
  * Account balance
  * Risk percentage
  * Stop loss distance
  * Symbol tick value/size

Lot size formula: Risk$ / (SL_Points * TickValue/TickSize)

Automatically adjusts lot size as account grows/shrinks.
Falls back to fixed InpLotSize if UseRiskPercent=false.
2026-03-25 22:43:25 -04:00
garfield 15cd0153e3 Add order cancellation logic to OrdersEA_Smart_Grid
New functions:
- CancelAllOrders(reason): Cancels all pending orders with logging
- CloseAllPositions(reason): Closes all open positions
- IsBreakout(): Detects when price breaks S2/R2

Order cancellation triggers:
1. ADX rises (trend starts) - Cancel all, wait for ranging
2. Price breaks S2/R2 (breakout) - Cancel all, close positions
3. Buy positions fill - Cancel remaining buy stops (avoid overexposure)
4. Sell positions fill - Cancel remaining sell stops
5. End of day (00:00) - Cancel all, close positions, reset grid

This prevents:
- Orphaned orders when trend starts
- Overexposure when one side fills
- Old orders from previous day causing issues
2026-03-24 21:53:44 -04:00
garfield b5df20d054 Fix invalid price errors - add stop level validation 2026-03-24 15:35:12 -04:00
garfield 2bdaee0fe5 Fix missing input declarations in OrdersEA_Smart_Grid
Added missing input variables:
- input int EquityFactorPercent= 0;
- input int LotsFactorPercent= 0;

These were referenced in CalcLots() function but not declared.
2026-03-24 15:02:01 -04:00
garfield 0a26f3469f Fix type conversion errors in OrdersEA_Smart_Grid
Changed initEquity from int to double to fix:
- Line 217: double - int subtraction
- Line 226: int * double / double calculation
- Added explicit cast for BaseEquity assignment

This resolves implicit type conversion warnings/errors in MT5.
2026-03-24 15:00:08 -04:00
garfield a74b5db8f7 Fix MT5 array declaration issues in OrdersEA_Smart_Grid
Changed dynamic arrays to fixed-size arrays:
- MqlRates rates[] -> rates[1]
- double rsiBuf[] -> rsiBuf[1]
- double adxBuf[] -> adxBuf[1]
- double atrBuf[] -> atrBuf[1]
- Removed ArraySetAsSeries calls (not needed for fixed arrays)

This fixes common 'array out of range' errors in MT5.
2026-03-24 14:52:42 -04:00
garfield f0b8653420 Add complete MT5 conversion of OrdersEA_Smart_Grid
Full MQL4 to MQL5 conversion:
- Replaced OrderSend with CTrade::OrderSend
- Replaced MarketInfo with SymbolInfoDouble/Integer
- Replaced Bid/Ask/Digits/Point with SymbolInfoDouble
- Changed int ticket to ulong ticket
- Updated indicator handling (iRSI/iADX/iATR with CopyBuffer)
- Updated order placement to MqlTradeRequest/Result
- Added proper TRADE_ACTION_PENDING for stop orders
- Added OrderFillling_IOC compliance
2026-03-24 14:35:38 -04:00
garfield 4bbf470ed6 Fix OrdersEA_Smart_Grid compile errors
- Removed WinUser32.mqh include (path issues)
- Removed IndicatorRelease calls (MT5 only function)
- MT4 doesn't require explicit indicator cleanup
2026-03-24 14:14:50 -04:00
garfield 73d420c2c2 Add OrdersEA_Smart_Grid v3.0 - Auto pivot + RSI/ADX filters 2026-03-24 14:02:24 -04:00
garfield 2e1c617e73 Fix compile error in OrdersEA - variable scope issue
Line 142: 'i' was declared inside for loop, not accessible outside.
Fixed by declaring 'i' before the loop:
  int i=0;
  for(i=0; i<logTicketsCounter; i++)
2026-03-24 13:38:42 -04:00
garfield 5c6c5e4741 Add MT5 safety tools to prevent MetaEditor freezes
- check-syntax.sh: Pre-compilation syntax checker for MT4→MT5 issues
- metaeditor-watchdog.sh: Auto-kills stuck MetaEditor processes
- safe-compile.sh: Wrapper with 2-minute timeout for compilations

These tools help prevent the container freeze that occurred when
trying to compile OrdersEA with 100 MT4 syntax errors.
2026-03-24 13:36:55 -04:00
garfield c415cd9919 Convert OrdersEA to proper MT5 syntax (v2.0)
Major changes for MT5 compatibility:
- Replaced MT4 OrderSelect() with MT5 PositionGet/HistorySelect
- Replaced MarketInfo() with SymbolInfoDouble/Integer
- Replaced Bid/Ask/Digits/Point globals with function calls
- Updated trade functions to use CTrade class
- Changed ticket types from int to ulong
- Replaced WindowExpertName() with MQLInfoString()
- Replaced IsOptimization() with MQLInfoInteger()
- Updated copyright to Garfield Heron / fetcherpay.com

Note: Full grid logic needs comprehensive testing
2026-03-24 13:04:46 -04:00
garfield c342966488 Clean up OrdersEA MT4 version - Remove WinAPI and license dependencies
- Removed #include WinUser32.mqh (no more MessageBox)
- web.mq4 include already disabled, removed comment
- Replaced MessageBox with Print() for margin info
- Replaced SendMailEx with SendNotificationEx using native MT4 Alert()
- Updated copyright to Garfield Heron / fetcherpay.com
- Email default set to garfield@fetcherpay.com
2026-03-24 11:49:41 -04:00
garfield bf70b79237 Clean up OrdersEA.mq5 - Remove WinAPI and license dependencies
- Removed #include WinAPI/winuser.mqh (no more MessageBox)
- Removed #include web.mq5 (no more license check)
- Replaced MessageBox with Print() for margin info
- Replaced SendMailEx with SendNotificationEx using native MT5 notifications
- Updated copyright to Garfield Heron / fetcherpay.com
- Email default set to garfield@fetcherpay.com
- License check bypassed - always allows access
2026-03-24 11:49:06 -04:00
garfield 9fac45a9be Add OrdersEA MT5 version
- MT5 compatible version of the grid/layering EA
- Same basket trading logic as MT4 version
2026-03-24 09:45:01 -04:00
garfield d75ed2f6f2 Add OrdersEA v1.1 - Grid/Layering EA with basket trading
- Places multiple small trades above/below central price range
- Manages up to 600 trades in long/short arrays
- Averages price for basket exit
- Configurable HIGH/LOW range and Entry spacing
- Original file: OrdersEA (1).mq4
2026-03-24 09:44:46 -04:00
garfield e2d42b3015 Add complete volatility filters v1.12 (Anti-Chop)
- ATR filter: Blocks trades when volatility < 0.5% (narrow bands)
- ADX filter: Blocks trades when trend strength < 20
- CheckVolatilityFilter() called before every trade entry
- Prevents over-trading in choppy/consolidating markets
- Both filters ON by default, configurable via inputs
- Version bumped to 1.12
2026-03-22 10:35:22 -04:00