Am having problem with running a program that was working properly.
Recently I did some back testing / optimizing and had several occasions of memory allocation errors. Tomasz suggested I reduce internal memory (that may have fixed problem) but now I see a basic malfuncton.
An if statement is simply being ignored and contents of the "if block" are being executed when they should not.
I re-installed Amibroker as an upgrade, then did a full installation but still have same problem
The code is incorrect as it ends the if() statement with the semicolon before curly brace.
As to the code example you have posted, you have SEMICOLON at the end of if, so brace below does NOT belong to if statement. The if body in your code is EMPTY.
AnalysisDisplay = "None";
if( AnalysisDisplay == "Trade_Display"); // The statement ENDS when you place semicolon here
// anything after semicolon does not belong to IF
{
EqROC_labelx = StaticVarGetTExt("EqROC_label");
}
For block to belong to if statement, there must NOT be semicolon before brace:
AnalysisDisplay = "None";
if( AnalysisDisplay == "Trade_Display") // NO SEMICOLON!
{
// NOW this belongs to iff
EqROC_labelx = StaticVarGetTExt("EqROC_label");
}