Commit Graph

39 Commits

Author SHA1 Message Date
028a41b9b5 Fix: remove abovePivot/belowPivot debug references 2026-03-29 23:51:58 -04:00
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
ac32303eeb Session Save 2026-03-29: Complete EA analysis, bug fixes, and 24 settings files documentation 2026-03-29 23:03:39 -04:00
ab710633c0 Add Confluence EA settings for GBPJPY (The Beast) - extreme volatility warnings 2026-03-29 22:58:11 -04:00
57107aac08 Add specific Grid EA settings for EURUSD, USDJPY, GBPUSD, GBPJPY 2026-03-29 22:53:21 -04:00
3f64e34522 Add complete .set files for all major pairs: USDCAD, AUDUSD, NZDUSD, USDCHF, XAUUSD Grid 2026-03-29 22:49:09 -04:00
044b047f6c Add EURJPY settings for Confluence EA and Grid EA 2026-03-29 22:43:03 -04:00
8457079306 Add comprehensive .set files for Confluence EA and Grid EA by pair type 2026-03-29 22:37:49 -04:00
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
3971dbd2b3 Rename HIGH/LOW to InpHigh/InpLow to avoid MQL5 constant conflict 2026-03-29 22:28:14 -04:00
16b69d251c Fix warningPrinted scope - restructure CheckDailyDrawdown function 2026-03-29 22:27:13 -04:00
04756ef2bd Fix warningPrinted scope error - move declaration to function level 2026-03-29 22:23:35 -04:00
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
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
b5df20d054 Fix invalid price errors - add stop level validation 2026-03-24 15:35:12 -04:00
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
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
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
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
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
73d420c2c2 Add OrdersEA_Smart_Grid v3.0 - Auto pivot + RSI/ADX filters 2026-03-24 14:02:24 -04:00
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
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
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
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
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
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
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
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
86fa4b2bcb Add volatility filters v1.12 (Anti-Chop)
- ATR filter: Blocks trades when volatility < 0.5% (narrow bands)
- ADX filter: Blocks trades when trend strength < 20
- Prevents over-trading in choppy/consolidating markets
- Both filters ON by default, can be disabled in inputs
- Version bumped to 1.12
2026-03-22 10:18:34 -04:00
2b6db7ba89 Add read-report utility to parse HTML directly
- read-report.sh: Bash wrapper to find and read report
- parse-html-report.py: Python parser for MT5 HTML reports
- Reads directly from Wine Desktop location
- Displays formatted report in terminal
- Shows browser access URL
2026-03-21 20:41:04 -04:00
d98f833e82 Add browser direct access documentation 2026-03-21 20:38:08 -04:00
f11ab2ec55 Add live report export utilities
- export-live-report.py: Export from binary deal files
- create-live-report.sh: Create report from screenshot/terminal data
- Allows creating browser-viewable reports with current live data
- Uses ,935 profit from March 21 screenshot
2026-03-21 19:59:56 -04:00
e58a4a425f Add export-to-browser utility
- export-report-html.py: Converts MT5 report to clean, styled HTML
- export-to-browser.sh: Wrapper script for easy usage
- Generates beautiful HTML report viewable in any browser
- Includes performance summary, trade stats, and risk metrics
2026-03-21 19:42:16 -04:00
14c4e7da2f Add show-latest-report utility
- show-latest-report.sh: Auto-finds and displays latest MT5 report
- parse-report.py: Python parser for HTML reports with full stats
- Updated UTILS.md with documentation
- No browser needed - prevents VM crashes
- Shows account info, P&L, trade stats, performance assessment
2026-03-21 19:29:49 -04:00
9575c5ed76 Add MT5 helper utilities
- view-report.sh: Read HTML reports without browser
- parse-deals.py: Extract data from binary deal files
- export-history.sh: Safe export guide
- UTILS.md: Documentation for tools

Prevents VM crashes when accessing trading data.
2026-03-21 19:09:24 -04:00
32e5c6a2dd Add .gitignore for MQL development 2026-03-21 18:44:47 -04:00
27f8f54c05 Add Gitea setup instructions 2026-03-21 18:40:22 -04:00
74308b38e7 Initial commit: MQL Trading Bots
- MultiSignal Confluence EA v1.11 (stop loss bug fixed)
- Harmonic Pattern Finder v2 (optimized)
- Candlestick Pattern EA (fixed)
- Pivot Fade EA v4 (fixed)
- Bot series (10001, 10002, EnhancedEA)

Performance: ~19% return in 2 months on 00k account
2026-03-21 18:39:48 -04:00