ワンクリックで
mql5-indicator-patterns
MQL5 indicator development patterns. TRIGGERS - MQL5 indicator, OnCalculate, indicator buffers, MetaTrader 5.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
MQL5 indicator development patterns. TRIGGERS - MQL5 indicator, OnCalculate, indicator buffers, MetaTrader 5.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Park a draft message/text in macOS Notes for the operator to review and edit, then read it back before acting (e.g. before sending to a real person). Notes is the source of truth (AppleScript CRUD, iCloud-synced, provenance-stamped with the Claude Code session UUID); Stickies is a best-effort view-only desktop mirror. Use whenever you draft something a human should confirm/edit before it is sent or committed — messages, replies, announcements, anything outbound. TRIGGERS - hold this draft, park the message, let me edit first, draft for my approval, save to notes for review, read back the draft.
Autonomous polyglot monorepo bootstrap meta-prompt on the moon + proto + Bun stack (Nx-convergent). TRIGGERS - new monorepo, new repository, polyglot setup, scaffold repo, moon proto bootstrap, monorepo from scratch.
Access Gmail via CLI with 1Password OAuth. Use when user wants to read emails, search inbox, export messages, create drafts, or.
Keep a graphify knowledge graph current automatically: --watch mode (live rebuild on file save) or a post-commit git hook (rebuild per commit). TRIGGERS - graphify watch, auto-sync graph, keep graph updated, graphify git hook, graph out of date.
Build a multimodal knowledge graph from any folder (code, markdown, PDFs, images) using graphify. Produces graph.html, GRAPH_REPORT.md, graph.json, Obsidian vault, optional agent wiki. TRIGGERS - graphify, build knowledge graph, graph this folder, map this codebase, concept graph, god nodes, surprising connections.
Query an already-built graphify knowledge graph: natural-language questions, path-finding between two concepts, or explain a single node — without re-reading the source files. TRIGGERS - graphify query, ask the graph, what connects, path between concepts, explain node, query knowledge graph.
SOC 職業分類に基づく
| name | mql5-indicator-patterns |
| description | MQL5 indicator development patterns. TRIGGERS - MQL5 indicator, OnCalculate, indicator buffers, MetaTrader 5. |
| allowed-tools | Read, Grep, Edit, Write |
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.
Use this skill when:
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);
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)
For production MQL5 indicators:
These patterns solve the most common indicator development issues encountered in real-world MT5 development.
| 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 |
For detailed information, see:
After this skill completes, check before closing:
Only update if the issue is real and reproducible — not speculative.