thread "clinching"

samjesse

Active Trader
Aug 30, 2011
118
0
27
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
MQL5:
   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 high.
to
So the possibility of clinch occurrence is low.
???
thx
 
Last edited by a moderator: