Questions from Beginners MQL4 MT4 MetaTrader 4 - page 117

 
Mickey Moose: Is this from the field that appears in the terminal data window?

any indicator buffer can be disabled in the data window : SetIndexLabel(1, NULL);

 
novichok2018:

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

 
STARIJ:

The data window may not show any indicator buffer: SetIndexLabel(1, NULL);

Ok. Suppose we have an indicator with 6 buffers
Do I have to write iCustom every time to get the values of each of them on the current candlestick? Even if they are not shown in the main window?
I want to access this buffer to get its current value
 
Mickey Moose:
Ok. Suppose we have an indicator with 6 buffers
Do I have to write iCustom every time to get the values of each of them on the current candlestick? Even if they are not shown in the main window?
I want to access the buffer to get its current value at the moment of time

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 .....

 
Mickey Moose:
Ok. Suppose we have an indicator with 6 buffers
Do I have to write iCustom every time to get the values of each of them on the current candlestick? Even if they are not shown in the main window?
I want to access the buffer to get its current values at the moment of time
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 6 times... Although, if you write the indicator and the data are Boolean or int - you can encrypt it into 1 double and put into 1 buffer for reading at once
 
STARIJ:
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

Igor Makanu:

" 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.

 
Mickey Moose:

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.

 
Mickey Moose:

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 ""

Mickey Moose: If there will be 2 indicators hanging in the window, where will it import this data from? I think there is a binding, like the third buffer of some indicator on the chart or in the data window, if it is custom. Or a variant of import of all its parameters.

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()

void OnStart()
  {
       for(int i=0;i<5;i++)
       {
         double val=iCustom(NULL,0,"ATR",14,1,i);
         Alert("Бар № ",i," , Значение = ",val);
       }
   
  }
 
Here's a look at the script for writing the zigzag to a file. Inside the comments
Files:
Zig2fl.mq4  5 kb
 
Greetings all. Please help me out. I'm new here and a complete zero. I want to learn how to trade. I downloaded MT4 and run it, but for some reason nothing happens, there is no movement. I keep the charts still at yesterday's number and I can not understand anything. Please help)))
Reason: