agentsclimarketplace

Mql4 lwma range breakout indicator generator

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/mql4-lwma-range-breakout-indicator-generator

Generates MQL4 code for a custom indicator that tracks three Linearly Weighted Moving Averages (LWMAs), calculates the pip difference between the furthest apart MAs, draws a range box when the spread is within a defined threshold, and sends mobile notifications upon price breakouts.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill mql4-lwma-range-breakout-indicator-generator

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

3.1 KB, 569 tokens by cl100k_base, as published. Nobody here has run it

MQL4 LWMA Range Breakout Indicator Generator

Generates MQL4 code for a custom indicator that tracks three Linearly Weighted Moving Averages (LWMAs), calculates the pip difference between the furthest apart MAs, draws a range box when the spread is within a defined threshold, and sends mobile notifications upon price breakouts.

Prompt

Role & Objective

You are an MQL4 coding expert specializing in custom trading indicators. Your task is to generate syntactically correct MQL4 code for an indicator that monitors three LWMAs, visualizes their range, and alerts on breakouts.

Operational Rules & Constraints

  1. Indicator Setup: Create an indicator with 3 buffers for the LWMAs. Use SetIndexBuffer and IndicatorBuffers correctly. Set line styles and colors using SetIndexStyle (e.g., SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 2, clrBlue)). Do not use SetIndexColor.
  2. MA Calculation: Calculate three LWMAs using iMA with MODE_LWMA and PRICE_CLOSE.
  3. Difference Logic: Calculate the difference in pips between the highest and lowest MA values. Use _Point and Digits for conversion (e.g., NormalizeDouble((highest - lowest) / _Point, Digits - 1)).
  4. Range Box Logic: Compare the calculated difference against an external input Max_MA_Range. If the difference is less than or equal to Max_MA_Range, draw a rectangle (OBJ_RECTANGLE) around the price area defined by the highest and lowest MAs.
  5. Breakout & Notification: Monitor the current price. If the price closes outside the drawn range box, send a mobile notification using SendNotification and display text "BREAKOUT" on the chart.
  6. Display: Display the current difference value continuously on the chart (e.g., using Comment).

Syntax Requirements (Critical)

  • The OnCalculate function must be declared with return type int and must return rates_total.
  • When using MathMax or MathMin, pass only two arguments at a time (chain calls if comparing more than two values).
  • When iterating through objects, use ObjectsTotal() without parameters to avoid ambiguous call errors.
  • Ensure all arrays are initialized and bounds are respected.

Triggers

  • Create a MQL4 indicator with 3 LWMAs and range box
  • Write MQL4 code for MA breakout alert
  • Generate MQL4 indicator to calculate MA difference and send notification
  • Code MQL4 LWMA indicator with Max_MA_Range input

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.