mql5-indicator-patterns

terrylica/cc-skills · updated May 20, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/terrylica/cc-skills --skill mql5-indicator-patterns
0 commentsdiscussion
summary

Battle-tested patterns for creating custom MQL5 indicators with proper display, buffer management, and real-time updates.

skill.md

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:

  1. Explicit scale for small values (< 1.0 range)
  2. Hidden buffers for recalculation tracking
  3. New bar detection prevents rolling window drift
  4. Static variables maintain state efficiently
  5. Proper warmup calculation prevents misalignment
  6. 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:

Post-Execution Reflection

After this skill completes, check before closing:

  1. Did the command succeed? — If not, fix the instruction or error table that caused the failure.
  2. Did parameters or output change? — If the underlying tool's interface drifted, update Usage examples and Parameters table to match.
  3. 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.

how to use mql5-indicator-patterns

How to use mql5-indicator-patterns on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add mql5-indicator-patterns
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/terrylica/cc-skills --skill mql5-indicator-patterns

The skills CLI fetches mql5-indicator-patterns from GitHub repository terrylica/cc-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/mql5-indicator-patterns

Reload or restart Cursor to activate mql5-indicator-patterns. Access the skill through slash commands (e.g., /mql5-indicator-patterns) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.426 reviews
  • Yash Thakker· Nov 7, 2024

    I recommend mql5-indicator-patterns for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Dhruvi Jain· Oct 26, 2024

    Useful defaults in mql5-indicator-patterns — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Oshnikdeep· Sep 21, 2024

    mql5-indicator-patterns is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Daniel Jackson· Sep 9, 2024

    mql5-indicator-patterns fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Noah Patel· Aug 28, 2024

    We added mql5-indicator-patterns from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Ganesh Mohane· Aug 12, 2024

    Keeps context tight: mql5-indicator-patterns is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Hassan Bhatia· Jul 23, 2024

    mql5-indicator-patterns has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Sophia Agarwal· Jul 19, 2024

    mql5-indicator-patterns reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Sakshi Patil· Jul 3, 2024

    mql5-indicator-patterns has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Chaitanya Patil· Jun 22, 2024

    Solid pick for teams standardizing on skills: mql5-indicator-patterns is focused, and the summary matches what you get after install.

showing 1-10 of 26

1 / 3