EA won't work? HELP :)

 

double sMACDi = GlobalVariableGet(sMA);
if (sMACDi == 1) //If Signal Line Crosses MACD Line, Buy
{
Opn_B=true;
Cls_S=true;
}

if (sMACDi == -1) //If Signal Line Exits MACD Line, Sell
{
Opn_S=true;
Cls_B=true;
}

I checked if the indicator was reporting the global variable as 1 to open a position. It is. I then asked the EA to comment what the sMACDi was coming in at and it said 0? What is wrong with my importing of GVs?

 

Replace

double sMACDi = GlobalVariableGet(sMA);

to

double sMACDi = GlobalVariableGet("sMA");

Reason: