Download MetaTrader 5

thread "clinching"

To add comments, please log in or register
samjesse
205
samjesse  
Hi

in the Mql5 doc.

Example of a Script for Adding History

we read:

The next important check is checking the type of the program, from which the function is called. Note, sending request to update the timeseries with the same period as that of the indicator, that calls the update, is undesirable. The undesirability of requesting data on the same symbol-period as that of the indicator is conditioned by the fact that update of history data is performed in the same thread where the indicator operates. So the possibility of clinch occurrence is high. To check this use the MQL5InfoInteger() function with the MQL5_PROGRAM_TYPE modifier.

what is clinch?
Is it something the writer is trying to avoid or achieve?

from the code that follows


   if(MQL5InfoInteger(MQL5_PROGRAM_TYPE)==PROGRAM_INDICATOR && Period()==period && Symbol()==symbol)
      return(-4);

It seams to me the writer is trying to avoid the scenario he describe.

if so, isn't the sentence he wrote should be corrected;
from
So the possibility of clinch occurrence is [B]high[/B].
to
So the possibility of clinch occurrence is [B]low[/B].
???
thx
To add comments, please log in or register