//+------------------------------------------------------------------+//| MathSample |//+------------------------------------------------------------------+//| The function takes a sample of the specified size from the |//| elements of the array[] with replacement. |//| |//| Arguments: |//| array[] : Array with double values |//| count : Number of elements to choose |//| replace : If true, only unique values are placed to result[] |//| result[] : Output array |//| |//| Return value: true if successful, otherwise false. |//+------------------------------------------------------------------+bool MathSample(constdouble &array[],constint count,constbool replace,double &result[])
{
//--- unique values not neededif(!replace)
return MathSample(array,count,result);
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
We made decision to change behavior
New code
Build 3187
behavior still unchanged, the logic in inverted.
Build 3191: Bug is resolved.
Thanks.