Skills Plugins MCP Prompt Model 博客 我的中心

mql5-indicator-patterns

MQL5 indicator development patterns. TRIGGERS - MQL5 indicator, OnCalculate, indicator buffers, MetaTrader 5.

DeepseekModel 官方收录技能 质量 优秀 · 78 v1.0.0

获取

https://deepseekmodel.com/api/download.php?id=terrylica-cc-skills-plugins-mql5-skills-mql5-indicator-patterns-skill-md&format=skill
下载 .skill 标准格式,含 system_prompt 与 model_config,导入任意 Agent 框架即可使用
.skill 文件中 system_prompt 字段的实际内容。
name mql5-indicator-patterns description MQL5 indicator development patterns. TRIGGERS - MQL5 indicator, OnCalculate, indicator buffers, MetaTrader 5. allowed-tools Read, Grep, Edit, Write MQL5 Visual Indicator Patterns Battle-tested patterns for creating custom MQL5 indicators with proper display, buffer management, and real-time updates. Self-Evolving Skill : This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues. When to Use This Skill Use this skill when: Creating custom MQL5 indicators for MetaTrader 5 Debugging indicator display or buffer issues Setting up OnCalculate with proper warmup handling Implementing new bar detection patterns Quick Reference Essential Patterns Display Scale (for small values < 1.0): IndicatorSetDouble(INDICATOR_MINIMUM, 0.0); IndicatorSetDouble(INDICATOR_MAXIMUM, 0.1); Buffer Setup (visible + hidden): SetIndexBuffer(0, BufVisible, INDICATOR_DATA); // Visible SetIndexBuffer(1, BufHidden, INDICATOR_CALCULATIONS); // Hidden New Bar Detection (prevents drift): static int last_processed_bar = -1; bool is_new_bar = (i > last_processed_bar); Warmup Calculation : int StartCalcPosition = underlying_warmup + own_warmup; PlotIndexSetInteger(0, PLOT_DRAW_BEGIN, StartCalcPosition); Common Pitfalls Blank Display : Set explicit scale (see Display Scale reference) Rolling Window Drift : Use new bar detection with hidden buffer (see Recalculation reference) Misaligned Plots : Calculate correct PLOT_DRAW_BEGIN (see Complete Template reference) Forward-Indexed Arrays : Always set ArraySetAsSeries(buffer, false) Key Patterns For production MQL5 indicators : Explicit scale for small values (< 1.0 range) Hidden buffers for recalculation tracking New bar detection prevents rolling window drift Static variables maintain state efficiently Proper warmup calculation prevents misalignment Forward indexing for code clarity These patterns solve the most common indicator development issues encountered in real-world MT5 development. Troubleshooting Issue Cause Solution Blank indicator window Scale not set for small values Set INDICATOR_MINIMUM/MAXIMUM explicitly Values drifting over time Rolling window not reset Use new bar detection with hidden buffer Misaligned plot start Wrong PLOT_DRAW_BEGIN Calculate: underlying_warmup + own_warmup Reversed array indexing Series mode enabled Call ArraySetAsSeries(buffer, false) Buffer values incorrect Wrong INDICATOR_DATA type Use INDICATOR_CALCULATIONS for hidden buffers Compile error on buffer Buffer count mismatch Match #property indicator_buffers with SetIndexBuffer Indicator not updating OnCalculate return wrong Return rates_total to signal successful calculation Performance issues Recalculating all bars Only recalculate from prev_calculated onwards Reference Documentation For detailed information, see: Display Scale - Fix blank indicator windows for small values Buffer Patterns - Visible and hidden buffer architecture Recalculation - Bar detection and rolling window state management Complete Template - Full working example with all patterns Debugging - Checklist for troubleshooting display issues Post-Execution Reflection After this skill completes, check before closing: Did the command succeed? — If not, fix the instruction or error table that caused the failure. Did parameters or output change? — If the underlying tool's interface drifted, update Usage examples and Parameters table to match. Was a workaround needed? — If you had to improvise (different flags, extra steps), update this SKILL.md so the next invocation doesn't need the same workaround. Only update if the issue is real and reproducible — not speculative.
Agent 识别该技能的关键词,点击任意一个即可复制。

该技能未提供触发词。

下载的 .skill 包内含以下字段。
字段 说明
format格式标识(skill/v1)
skill_id技能唯一 ID
name技能名称
version版本号
description技能描述
category所属分类(数组)
trigger_words触发词列表
tags标签列表
source来源标识
source_url来源链接(本页地址)
exported_at导出时间(每次下载生成)
system_prompt系统提示词正文
model_config模型参数:provider / model / temperature / max_tokens / top_p
examples示例
install_guide各平台导入说明(Coze / Dify / Claude / 自定义框架)
同一份技能可按不同平台格式导出。
.skill 标准格式,含 system_prompt 与 model_config,导入任意 Agent 框架即可使用 下载
.skillpro 增强格式,额外含脚本 / 工具 / 依赖 / 钩子占位 下载
.json 纯 JSON 导出,只含 system_prompt 与模型参数 下载
Coze 带 frontmatter 的 Markdown,Coze 平台导入用 下载
Dify Dify DSL,创建应用后直接导入 下载

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。