Questions from Beginners MQL4 MT4 MetaTrader 4 - page 117

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
any indicator buffer can be disabled in the data window : SetIndexLabel(1, NULL);
Replaced. Cursed error 138 (requotes). Then returned the break, and it's 138 again. Strange, maybe I didn't notice it before.
Requotes are Friday evening fast price changes and the broker protects itself from losses
The data window may not show any indicator buffer: SetIndexLabel(1, NULL);
Ok. Suppose we have an indicator with 6 buffers
If you need values of 6 buffers, you call iCustom 6 times with the same parameters, except for the parameter mentioned in the help: "int mode,
"mode [in] Index of the indicator line. Can take values from 0 to 7 and correspond to the index specified when calling the SetIndexBuffer() function".
the mode parameter will be a number from 0 to 5
the current value at the moment is the parameter: "int shift // shift "
"shift [in] The index of the value obtained from the indicator buffer (shift relative to the current bar by the specified number of periods back). "
i.e. for zero bar shift = 0, for penultimate bar shift = 1 .....
Ok. Suppose we have an indicator with 6 buffers
Why do you need to write 6 times - you can do it in the for loop and even while. But you have to apply to the indicator for 6 values... Although, if you write the indicator yourself and the data are Boolean or int - you can encrypt them into 1 double and place in 1 buffer for reading at once
I know how to write them a little better than nothing))))) I didn't need to
well and regarding int filehandle=FileOpen(20180210,FILE_WRITE,';',CP_ACP);
about the custom
iCustom(NULL,0,'nameindicator','WHATWHEREWHERE TO WORK?',0,MODE_MAIN,0); it says here that we should specify parameters but there are dozens of them and they don't have anything to do with robot buffers
I try to open the log file for reading
int filehandle=FileOpen(20180210,FILE_WRITE,';',CP_ACP);
it says invalid filename. open folder with logs - everything is fine
" mode [in] Index of the indicator line. Can take values from 0 to 7 and corresponds to the index you specified when calling the SetIndexBuffer() function".
the mode parameter will be a number from 0 to 5
This is clear, except where theSetIndexBuffer() is coming from. If there will be 2 indicators in the window, where will it import these data from? There is a binding, e.g., the third buffer of some indicator in the chart or data window, if it is a custom one. Or the option of importing all its parameters.
I know how to write them a little better than nothing))))) I didn't need to
well and regarding int filehandle=FileOpen(20180210,FILE_WRITE,';',CP_ACP);
about the custom
iCustom(NULL,0,'nameindicator','WHATWHEREWHERE TO WORK?',0,MODE_MAIN,0); it says here that we should specify parameters but there are dozens of them and they don't have anything to do with robot buffers
I try to open the log file for reading
int filehandle=FileOpen(20180210,FILE_WRITE,';',CP_ACP);
says invalid file name. open logs folder - everything is fine
I understand this, except where theSetIndexBuffer() is coming from. If there will be 2 indicators in the window, where will it import these data from? There should be a binding, e.g. the third indicator buffer in a chart or data window, if it is a custom one. Or a variant of import of all its parameters.
iCustom(NULL,0, "indicator name", Can I write nothing to make it work?,0,MODE_MAIN,0);
Will work with default parameters.
trying to open a log file for reading
int filehandle=FileOpen(20180210,FILE_WRITE,';',CP_ACP);
says invalid filename. open logs folder - everything is fine
filename is string type, you have number 20180210, if this number is filename, you need ""
in ICustom() you write the indicator name, if there are 2 indicators, you will call 2 iCustom() with different names, try to practice on a standard indicator - output a few indicator values via Alert, it is better to make a script, not an Expert Advisor for understanding the work with iCustom()