-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MT4] MA computation error #20
Comments
It's a good question. To clarify, you're comparing by running MA.mq4 indicator on MT4, for different Source type (InpSourceType), between builtin iMA() (IDATA_BUILTIN) and platform's 'Custom Moving Average.mq4' (IDATA_ICUSTOM)? If so, then it's difficult to say, since we don't have access to the source code of |
I've found a fix, even though I don't yet understanding clearly (my understanding of MT4 ways to fetch data from hcc cache data/server is not clear enough yet)... I've solved the delta doing this : @@ -121,7 +122,7 @@ int OnCalculate(const int rates_total, const int prev_calculated,
Choosing BUILTIN or CUSTOM gives the same result... |
BTW I will check when indicator is inside the Expert Advisor (IDATA_INDICATOR)... What is still a little bit upsetting me, is when I add a "+1" or "-1" in a code, but don't understand exactly why is SHALL be so ;) |
The problem could have arrived because original If the code starts without history - e.g., via starting Debug session, initial values of the indicators could differ from the ones seen in Tester. The main fix we've done for already provided indicators was to change starting index:
So start index won't end up with negative value and all bars for BTW, many of the source codes that ends up in I will investigate it shortly. |
The MA computed by EA31337 Indi_MA, used in MA.mq5 in EA31337-Indicators/Common/Price has slight difference compared with the MA provided by MetaTrader (Either builtin "Moving Average" indicator or "Custom Moving Average.mq4" example).
Both MA use same period and close value
I cannot figure out the reason of this difference.
Configuration statement
The cloning of EA31337 repo in MQL4 folder is:
The text was updated successfully, but these errors were encountered: