agentleFS
kecoma1kecoma1/MQL5-SKILLS/skills/paint-objects/SKILL.md

paint-objects

Skill17 starsChanged 7 months agoMITView on GitHub

Use when drawing or updating chart objects in MQL5 for this workspace. Follow the local rules for choosing the right object type, anchoring it to the correct candle, updating existing objects safely, and forcing chart redraw when needed.

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 8 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill when creating or editing MQL5 code that paints chart objects with ObjectCreate, ObjectMove, or ObjectSetInteger.

    line 8
  2. Very specific:

    Use OBJ_RECTANGLE for zones, gaps, ranges, and areas with top and bottom.

    line 14
  3. Distinctive:

    Do not simulate a zone with two trend lines when the intent is a filled area.

    line 15
  4. Distinctive:

    Use lines only when the user explicitly wants a line-based drawing.

    line 16
  5. Distinctive:

    If the drawing is based on a multi-candle pattern, confirm which candle defines the start time.

    line 22
  6. Very specific:

    Do not assume ObjectCreate will succeed repeatedly with the same name.

    line 37
  7. Distinctive:

    If the object does not exist, create it.

    line 39
  8. Very specific:

    If the object already exists, update it with ObjectMove.

    line 40
  9. Distinctive:

    Keep object names stable and deterministic.

    line 41
  10. Distinctive:

    After painting or updating objects, force a chart refresh when needed.

    line 59
  11. Very specific:

    Call ChartRedraw(chart_id) after a batch of object updates.

    line 61
  12. Distinctive:

    Do not assume the chart will visibly refresh immediately on its own.

    line 62
  13. Distinctive:

    When painted objects do not appear, check these points before changing strategy logic:

    line 66

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Paint Objects

Use this skill when creating or editing MQL5 code that paints chart objects with ObjectCreate, ObjectMove, or ObjectSetInteger.

Object Choice

Choose the object type that matches the visual requirement.

  • Use OBJ_RECTANGLE for zones, gaps, ranges, and areas with top and bottom.
  • Do not simulate a zone with two trend lines when the intent is a filled area.
  • Use lines only when the user explicitly wants a line-based drawing.

Anchoring

Anchor the object to the correct candle and prices.

  • If the drawing is based on a multi-candle pattern, confirm which candle defines the start time.
  • For the FVG case in this workspace, the rectangle must start at candle 1, the oldest candle in the 3-candle pattern.
  • For zones, use the upper price as the top and the lower price as the bottom.

Example pattern for FVG:

datetime start_time = StructToTime(time);
datetime end_time = start_time + (duration_minutes * 60);

ObjectCreate(chart_id, rect_name, OBJ_RECTANGLE, 0, start_time, high, end_time, low);

Repainting And Updates

Do not assume ObjectCreate will succeed repeatedly with the same name.

  • If the object does not exist, create it.
  • If the object already exists, update it with ObjectMove.
  • Keep object names stable and deterministic.

Pattern:

if(ObjectFind(chart_id, object_name) < 0)
{
   ObjectCreate(chart_id, object_name, OBJ_RECTANGLE, 0, start_time, high, end_time, low);
}
else
{
   ObjectMove(chart_id, object_name, 0, start_time, high);
   ObjectMove(chart_id, object_name, 1, end_time, low);
}

Visibility

After painting or updating objects, force a chart refresh when needed.

  • Call ChartRedraw(chart_id) after a batch of object updates.
  • Do not assume the chart will visibly refresh immediately on its own.

Validation

When painted objects do not appear, check these points before changing strategy logic:

  1. The object name is not colliding with an existing object unexpectedly.
  2. Existing objects are updated with ObjectMove instead of recreated blindly.
  3. ChartRedraw(...) is called after painting.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.