GVs of the Terminal - Error 4058 New comment Neils 2018.04.04 15:16 Hi, I have what I thought was defensive code on getting a global variable. Can anyone explain why I got an error 4058 ? if (GlobalVariableCheck(GVQualify + "BadTrendLock") == True) { ResetLastError(); BadTrendLock = GlobalVariableGet(GVQualify + "BadTrendLock"); file_err = GetLastError(); if (BadTrendLock == 0 && file_err != 0) { Print("Error - ",file_err, " Getting Global Variable GVQualify-BadTrendLock (010)"); BadTrendLock = True; GlobalVariableSet(GVQualify + "BadTrendLock",1); } } From the Log : Error - 4058 Getting Global Variable GVQualify-BadTrendLock (010) [ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. Array Out Of Range Problem, Why it related to Global scope variable declaration? Ichimoku of RSI EA not opening positions. May you help Drazen Penic 2018.04.04 17:00 #1 #define ERR_GLOBAL_VARIABLE_NOT_FOUND 4058 Create a string variable and put the global variable name inside. Use that instead of repeated string concats. Also, print that variable to make sure that GVQualify has the correct value. New comment
Hi,
I have what I thought was defensive code on getting a global variable. Can anyone explain why I got an error 4058 ?
From the Log :
Error - 4058 Getting Global Variable GVQualify-BadTrendLock (010)