Re: Convert MT4 indicators to MT5

443
opita wrote: Fri May 24, 2024 8:05 am Sadly, it did not work.
The settings all look good, but it doesn't seem to work.

Appreciate the effort.
Thanks for testing. I'll have a slower look at the code and repost it if I can fix it.

EDIT: I can see that the indicator loops through symbols within the standard iMA and iATR functions inside OnCalculate. With the additional requirements of indicator handles which are of the integer type and CppyBuffer in MQL5, I unfortunately cannot devise a way to loop through the handles inside OnCalculate. I hope that someone else who knows how to do so will chime in to your respectful request.
“[A]s we know, there are known knowns—there are things we know we know. We also know there are known unknowns—that is to say we know there are some things we do not know. But there are also unknown unknowns—the ones we don’t know we don’t know.”—Donald Rumsfeld, 2002

Re: Convert MT4 indicators to MT5

444
opita wrote: Fri May 24, 2024 8:05 am Sadly, it did not work.
The settings all look good, but it doesn't seem to work.

Appreciate the effort.
Here's another version coded in "long form" with 64 internal indicator buffers. I attached it to a EURUSD chart, and it spit out some alerts but then stalled because I don't have access to the stock index symbols in the indicator.

Note that the symbols are hardcoded into the indicator, so the symbols input is disabled now. Changes to the list of symbols will require code edits.

EDIT: I found an uncoverted line of code in version 2.1. I converted it and replaced the attached file with version 2.2.

“[A]s we know, there are known knowns—there are things we know we know. We also know there are known unknowns—that is to say we know there are some things we do not know. But there are also unknown unknowns—the ones we don’t know we don’t know.”—Donald Rumsfeld, 2002




Who is online

Users browsing this forum: CommonCrawl [Bot], kvak, Mojeek [Bot] and 5 guests