Thank You
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
But there is a new problem (regression ??).
In the program test below, I create a global variable and assign "0".
Then I call GlobalVariableSetOnCondition() on this new variable with the third parameter <<check_value>> not equals to "0".
In this case, GlobalVariableSetOnCondition() should return "false" and no error is expected.
The problem : "false" is returned as expected but an ERR_GLOBAL_VARIABLE_NOT_FOUND (4058) is generated too !?!
//+------------------------------------------------------------------+ //| TEST_SCRIPT.mq4 | //| EMM | //| | //| | //| A test script to show a problem with the following commands : | //| - GlobalVariableSetOnCondition(...) | //| | //+------------------------------------------------------------------+ #include <stderror.mqh> #include <stdlib.mqh> int start() { // We set 0.0 value to the GV_TEST global variable GlobalVariableSet( "GV_TEST", 0.0 ); /* * The definition of GlobalVariableSetOnCondition() says ; * << If the current value of the global variable differs * from the check_value, the function will return FALSE.>> * The problem is the function generates * an ERR_GLOBAL_VARIABLE_NOT_FOUND (4058) too !?!?! * It should not... */ Print( "GlobalVariableSetOnCondition( \"GV_TEST\", 1.0, 2.0 ) returns ", GlobalVariableSetOnCondition( "GV_TEST", 1.0, 2.0 ), " and GetLastError() is << ",ErrorDescription( GetLastError() )," >>" ); return(0); }I sent a request about this problem in the Bugtracking section.