Loading...
Loading...
Compare original and translation side by side
$MQL5_ROOT/Program Files/MetaTrader 5/MQL5/Logs/YYYYMMDD.log$MQL5_ROOT/Program Files/MetaTrader 5/MQL5/Logs/YYYYMMDD.log.log.mq5undefined.mq5.logundefined
**File Format**:
- Encoding: UTF-16LE (often readable with plain `cat`)
- Contains: Compilation progress, error count, warnings, timing
- Success indicator: "0 errors, 0 warnings"
**Important**: Wine/CrossOver returns exit code 1 even on successful compilation. Always check the `.log` file or verify `.ex5` exists.
**文件格式**:
- 编码:UTF-16LE(通常可直接用`cat`命令读取)
- 内容包含:编译进度、错误数量、警告信息、耗时
- 成功标识:“0 errors, 0 warnings”
**重要提示**:在Wine/CrossOver环境下,即使编译成功也会返回退出码1。请务必检查`.log`文件或确认`.ex5`文件是否存在。TODAY=$(date +"%Y%m%d")
LOG_FILE="$MQL5_ROOT/Program Files/MetaTrader 5/MQL5/Logs/${TODAY}.log"TODAY=$(date +"%Y%m%d")
LOG_FILE="$MQL5_ROOT/Program Files/MetaTrader 5/MQL5/Logs/${TODAY}.log"Pattern: indicator name, "error", "ERROR", "v0\\.4\\.0", "Phase 2", etc.
Path: Log file from Step 1
Output mode: "content"
-n: true (show line numbers)
-A: 5 (show 5 lines after matches for context)CCI Rising Test|CCI_Rising_Testerror|ERROR|failedv0\\.4\\.0|v0\\.3\\.0Phase \\d+|Test arrow createdDEBUG Bar匹配规则:指标名称、"error"、"ERROR"、"v0\.4\.0"、"Phase 2"等
路径:步骤1中获取的日志文件
输出模式:"content"
-n: true(显示行号)
-A: 5(显示匹配结果后5行上下文)CCI Rising Test|CCI_Rising_Testerror|ERROR|failedv0\.4\.0|v0\.3\.0Phase \d+|Test arrow createdDEBUG Bar.ex5undefined.ex5undefined
Look for initialization message with version number and timestamp matching the reload time.
查找包含版本号的初始化消息,确认其时间戳在编译完成时间之后。Pattern: "error|ERROR|failed|Failed"
Output mode: content
Context: -A 3 -B 1 # Show 3 lines after, 1 before匹配规则:"error|ERROR|failed|Failed"
输出模式:content
上下文:-A 3 -B 1 # 显示匹配结果后3行、前1行上下文Pattern: "DEBUG Bar"
Output mode: content
Context: -A 0 # No extra context needed
-n: true # Show line numbers匹配规则:"DEBUG Bar"
输出模式:content
上下文:-A 0 # 无需额外上下文
-n: true # 显示行号Pattern: "Phase 2|Test arrow created|Failed to create"
Output mode: content
Context: -A 2匹配规则:"Phase 2|Test arrow created|Failed to create"
输出模式:content
上下文:-A 2-A-B-A-BUser: "I reloaded the indicator, can you check if v0.4.0 is running?"
Action:
1. Grep for "v0\\.4\\.0|CCI Rising Test v0\\.4"
2. Check most recent match timestamp
3. Verify it's after compilation time (16:59)
Output: "Yes, v0.4.0 loaded at 17:01 on EURUSD M1 chart"用户:“我重新加载了指标,能帮我检查v0.4.0是否在运行吗?”
操作步骤:
1. 搜索"v0\.4\.0|CCI Rising Test v0\.4"
2. 检查最新匹配结果的时间戳
3. 确认时间戳在编译完成时间(16:59)之后
输出:“已确认,v0.4.0于17:01在EURUSD M1图表上加载完成”User: "The last 19 bars are still empty, check the log"
Action:
1. Grep for "DEBUG Bar|CCI=" pattern
2. Look for EMPTY_VALUE or unusual values
3. Check for error messages with -A 3 context
Output: "Found 'CCI=179769313486231570...' which is EMPTY_VALUE constant. The indicator didn't calculate CCI for those bars."用户:“最近19根K线的直方图还是空的,检查一下日志”
操作步骤:
1. 搜索"DEBUG Bar|CCI="规则
2. 查找EMPTY_VALUE或异常值
3. 使用-A 3参数查看错误消息上下文
输出:“发现‘CCI=179769313486231570...’,这是EMPTY_VALUE常量。指标未计算这些K线的CCI值。”User: "Check if the absolute value fix is working"
Action:
1. Grep for "DEBUG Bar.*\\|CCI\\|=" (looking for |CCI|= output)
2. Compare with old format "DEBUG Bar.*CCI=" (without |CCI|)
3. Check timestamp matches latest compilation
Output: "The log shows old format (no |CCI|=) at 16:56. Need to reload to get v0.4.0 from 16:59."用户:“检查绝对值修复是否生效”
操作步骤:
1. 搜索"DEBUG Bar.*\|CCI\|="(查找|CCI|=格式的输出)
2. 与旧格式"DEBUG Bar.*CCI="(无|CCI|)对比
3. 检查时间戳是否与最新编译时间匹配
输出:“日志显示16:56的输出为旧格式(无|CCI|=)。需要重新加载以获取16:59编译的v0.4.0版本。”docs/guides/MT5_FILE_LOCATIONS.mddocs/plans/cci-rising-pattern-marker.yamlProgram Files/MetaTrader 5/MQL5/Indicators/Custom/Development/CCINeutrality/lib/CSVLogger.mqhdocs/guides/MT5_FILE_LOCATIONS.mddocs/plans/cci-rising-pattern-marker.yamlProgram Files/MetaTrader 5/MQL5/Indicators/Custom/Development/CCINeutrality/lib/CSVLogger.mqh