EX4 custom indicator with licence key conversion
-
Hello guys! I think my question will add to the value here. I try to add to "My indicators" EX4 custom indicator with STRING value and it gives "implicit conversion from 'string' to 'number" error on the compilation.
The parameter value is an indicator licence key and it comprised of letters and digits. The problem is the Metatrader tries to convert the whole key to digits only for some reason, so what I get after the compilation is done is "0" in the value field instead of the complete licence code!
Here is the project: https://fxdreema.com/shared/CKrrO9yXd
Does anyone know a workaround for this type of values and how to compile it correctly?
Thank you!

!

-
That is programmer's stuff. Maybe miro or roar can help.
-
-
@geofx hi!
The keys are declared as integers there. Try changing them to
input string

-
Roar, you r magician! It worked, man! I've just edited int datatype to string .mq4 file fields manually via MT4 editor, and it compiled it with no errors and warnings!

Roar rules! Thank you!Maybe it was a temporary bug or something, but the day before I already had the correct string datatype and correct value entered in fxdreema prior to compilation, yet it kept failing to compile correctly, putting int instead of string, as you've noticed. Now fxdreema compiles it correctly, though.
-
And to top it off, for all the lazy folks there, like me) an additional valuable contribution to this EX4 custom indicator short uploading guide: if u do not wanna mess with parameter names, just save your custom indicator settings as a preset .set file to this C:\Program Files (x86)\MetaTrader 4\MQL4\Presets location. Then, upon the indicator uploading, open that .set file with a Notepad (Right clcik->Open with) application and copy all the parameter names and values to your fxdreema replication as seen on the screen below.

-
If you not sure what datatype each parameter in your .ex4 indicator represents, then keep this table:
MT4 ICON = DATA TYPE
123 = int
1\2 = doulbe
AB = string (put Value in quoting)
Orange Rectangle = color -
The other nesessary condition for the MT4 licensed indicator to work correcly during the testing and trading, is to actually have it loaded on the chart.
For instance: if you need to test the EA that use such indicator with MT4 strategy tester, you need to save it to the tester default template first. Just save your regular template while having your indicator loaded on the chart and replace the default tester.tpl template upon the template saving in this directory: C:\Program Files (x86)\MetaTrader 4\templates keeping the template name "tester.tpl" the same.
-
Folks, if fxdreema builder fails to build the .MQ4 EA file, try to rebuild the block IDs first.
Go to: Options -> Project Options -> Project Blocks: Normalize IDsAnother bug i've noticed along my fxdreema experience and I suppose the problem lies within the MT4 platform itself and how it keeps its logs and history, is when you save your .MQ4 file, sometimes it is saved with an old modifications from your previous fxdreema edits. You can notice such bugs when you check your latest version EA modifiable parameters over the EA Input Settigs tab which just arent there. All you can observe is an old parameters from your EA previous version, only.
I cure it with EA name modification BEFORE of each save + Block IDs rebuilding, so everytime I save my project to the MT4 experts directory, Im confident my EA been saved with the latest parameters I've put.
Those tricks can really help, when it seems you have already done everything right, but for the unknown reason your EA doesnt work as expected
-
Impressive info. Thank you very much for sharing.