MT5 Build 6230: Initial values and binary64 calculation sequence of iMA (SMA, EMA, SMMA, LWMA)

Good day,

This is a public technical question. It is not a private support ticket.
A response is not guaranteed. A response from other participants remains to be seen.
supporting us until authorship is officially assigned to MetaQuotes and
The statement binds the built-in iMA to exactly this build.

We request a version-specific statement or a public statement.
MetaQuotes source regarding the built-in iMA of MetaTrader 5 Build 6230. This refers to...
The built-in iMA indicator of this build, not a sample indicator, and
not a separate calling program.

If "Build 6230" includes multiple product strings, specify the exact one.
A string for which every statement is true. If the execution within this
Since the build is not uniform, separate the statements by string. Please
Indicate whether the statement originates from MetaQuotes. A public source.
Including URL or document path, section and version reference is welcome.
MetaQuotes' own implementation statement makes the same points, if
Product, build number, and date are mentioned.

The items in question are MODE_SMA, MODE_EMA, MODE_SMMA and MODE_LWMA, as well as the seven
Price bases PRICE_CLOSE, PRICE_OPEN, PRICE_HIGH, PRICE_LOW, PRICE_MEDIAN,
PRICE_TYPICAL and PRICE_WEIGHTED. If Build 6230 has other official names
If you use them, name them.

MODE_SMMA this build is exclusively the implementation in the built-in
iMA. A similarly named smoothing of another platform is not the subject.
This question and for us no evidence of the same binary64 operation sequence.

From the public help texts, we already only use this:

- For SMMA, the terminal help explicitly mentions SMA as the first value.
- For SMA, the help text gives the mean value over N values.
- The help documentation provides a recursive formula for EMA.
- For LWMA, the help indicates a higher weighting of newer values.
- The price constant documentation lists mathematical formulas of the seven
Price bases.

The binding to the built-in iMA of Build 6230 is open and requested:
first finite index, index basis, which bars form the first SMA of the SMMA,
missing state before, exact alpha expression of the EMA, weight and
Denominator version of the LWMA, reduction or update sequence, bracketing, fma yes
or no, rounding or explicitly missing intermediate rounding, current bar
as well as recalculation when loading real history. The finding that the
If the first SMMA value is an SMA, please leave it as a concrete explanation.
including the index to which this SMA is linked.

The mathematical formula alone leaves these points open. Please provide...
the actual implementation. A specific tree notation is not required.
required; a precise formula, sequence of operations, or equivalent
A statement of order is sufficient.

A narrow, factual implementation statement or a
Public MetaQuotes source, which already lists the same points for exactly Build 6230
It contains the platform's complete private source code. The platform's complete private source code is not required.
No commitment to future builds or certification is required.
a third-party program or a RAM or JIT verification.

For each method, we request:

- official name
- Index base in the output buffer and in the time direction: meaning of 0,
oldest loaded bar, not yet closed bar
- first finite output index as an expression in N and L in the same index basis
- Seed of this first value. In the case of SMMA, the specific SMA execution and its index.
- State before this index: not written, or mask respectively
Behavior. A binary64 hex representation is permissible and not required.
- Lead time in bars
- EMA only: Alpha expression, time, reuse; otherwise omitted
- LWMA only: weight per position, oldest and newest bar; otherwise omitted
- Denominator and type of intermediate values, if a denominator exists
- executed sequence of operations and contribution order
- Progress update if this build performs it, otherwise the finding,
that it is not the implemented form. Full window and update remain.
two statements, even if they are algebraically similar
- Rounding: no intermediate rounding plus named binary64 rounding mode, or
exact rounding point, mode and target
- Bar not yet completed: Execution and which entries to enter when changing
their price source value will be rewritten
- Recalculation when loading or expanding the actual available history,
including new seed formation
- Recalculation upon closing a bar
- Output when L is less than the lead
- Non-infinite price source values only insofar as they are actually from the terminal
loaded history may occur, or the finding that such
Values are not created there

Each price source is assigned Close, Open, High, Low, Median, Typical and Weighted.
the official constants PRICE_CLOSE, PRICE_OPEN, PRICE_HIGH, PRICE_LOW,
PRICE_MEDIAN, PRICE_TYPICAL or PRICE_WEIGHTED, if those are the names
The following are from Build 6230:

- official name
- binary64 execution of p[i], including brackets
- unchanged binary64 bar field, or named conversion or
Rounding when reading

For Weighted, we specifically request the actual execution: whether Close
is twice a summand or enters with the coefficient 2, as parentheses indicate,
how the divisor is derived, and whether a named mean reduction can be applied via a
The named value list is executed. The same accuracy applies to the median and
Typical.

Please describe non-infinite values only for cases that are actually from
Terminal-loaded history may occur. Behavior on artificially generated
Sequences are not required. This post has no appendix and contains no...
Course series, no raw bars, no measured values and no file.

A field-by-field answer facilitates the assignment; a coherent,
A clear statement on the same points is equivalent. Equal.
Method points may be awarded once with the sentence "operationally identical for all seven
Fill in the price sources as soon as p[i] is determined. The seven price source explanations
They remain to be named individually.

Example notation, syntax only, no statement about the implementation:
div(add(a, b), c)
A unique formula or order statement without this notation is
equivalent. Example nodes: add, sub, mul, div, neg, fma, i2f64.
i2f64 refers to the conversion of an integer to binary64.
fma(a, b, c) denotes a merged multiplication-addition if it
is actually carried out.

Optional answer template, content before label:

V1 product and exact version string:
V2 Component: built-in iMA, Build:
V3 This statement describes the built-in iMA and not an example:
V4 Date of statement:
V5 Public source (URL, section) or “own implementation statement without URL”:
V6 Period range:

Method name in succession: SMA, EMA, SMMA, LWMA.
Each method; otherwise, it is "omitted" where a point does not apply to the method:
name, index_basis, first_index, seed, sentinel, warmup, alpha, weights,
denom, ops, order, incremental, rounding, current_bar, history_load,
bar_close, short_history, nonfinite.

Price source sequentially Close, Open, High, Low, Median, Typical, Weighted.
Per source: official_name, tree, read.

Thank you.

This is the English forum. Please post in English, or post in the German forum.

Do you expect an answer to that post? I am quite certain, nobody will actually answer your request.

The Forum is neither a reverse‑engineering service nor a source code disclosure service.

Please use the official documentation.

NOTE-1: Requests for internal implementation details are beyond the scope of the Forum.

NOTE-2: The Forum is mainly for users to:

  (i) exchange ideas

  (ii) discuss trading strategies, market trends, MetaTrader features and coding tips

  (iii) share views on other trading-related and market-related topics.



Dominik Egert #:
This is the English forum. Please post in English, or post in the German forum.

Do you expect an answer to that post? I am quite certain, nobody will actually answer your request.
i wont even read beyond the first para.
Michael Charles Schefe #:
i wont even read beyond the first para.

If you did, you wouldn't even find a question to be answered. I read the entire thread, and the only question in it is:

We have a lot of posts which are AI-generated. I am pretty sure, the human behind them, more or less often, don't even understand what it is all about.

Soon, and it already started, we will have AI-generated post answering to AI-generated post, with both humans behind these questions and answers not understanding, at least in depth, the topic discussed.

The next step will be AI Agents using forums to find help, most humans will not be able or want to answer, except possibly a minority. So in the end you will have AI Agents, without direct human intervention answering to AI Agents posts.

It will probably come fast.

And for now, it's still pretty easy to recognize AI generated posts, until it will not be easy any more.

What a wonderful world we will have, isn't it ? (sarcasm intended, I prefer to say it explicitly for humans and AI Agents which are not able to detect it).

https://forge.mql5.io/modular-indicator-architecture/evolution

The output of CSma, CEma, CSmma, and CLwma matches the built-in MT5 Moving Average indicator 100%.

The logic relies on <MovingAverages.mqh>, which comes with the terminal; consequently, the output aligns with that file as well. I haven't compared it against iMA, but I would be extremely surprised if iMA produced a different result.

I have just finished an article detailing the implementation of the modules I mentioned. The article is structured around commits from the repository I linked to earlier.

I will submit the draft for review in a few hours. I’ll post the link to the article here once it’s published (most likely in a few days).

evolution
evolution
  • modular-indicator-architecture
  • forge.mql5.io
https://www.mql5.com/en/articles/17566
Alain Verleyen #:
What a wonderful world we will have, isn't it ? (sarcasm intended, I prefer to say it explicitly for humans and AI Agents which are not able to detect it).
Is sarcasm allowed now? (I was banned for being funny with it in the past).
Ryan L Johnson #:

If you did, you wouldn't even find a question to be answered. I read the entire thread, and the only question in it is:


thanks for the summary at least

😂