0
votes

Please, how can I create a txt file which my Custom Indicator can read, and where I can store, add and edit my inputs, I would want it to look exactly like this :

symbol;digits;M1;M5;M15;M30;H1;H4;D1;W1;MN
EURUSD;4;20;40;70;130;200;350;650;1200;3500
USDCAD;4;20;40;70;130;200;350;650;1200;3500
USDNZD;4;20;40;70;130;200;350;650;1200;3500

I would want to be in position of adding more lines of data(inputs)

I have tried to start coding it but failed

1

1 Answers

0
votes

Q : "How to create inputs for my Indicator in MQL4?"

Step 0:

Define the file-format. The file per-se has to be inside <Terminal>/MQL4/files plus inside <Terminal>/Tester/files so as to let it become readable for the MQL4-code. Se the documentation for details of this sandboxing.

Step 1:

Define the file-reader void ConfigReader() {... } so as to match your file-format from Step-O.

Step 2:

Call the ConfigReader() from inside the event-handling section OnInit().

Step 3:

Design the rest of the Custom-indicator so as to obey such file-parametrised, OnInit-read-in throughout its rest of the life-cycle.

Step 4:

You are in the finish-line - THE PROBLEM IS SOLVED !