Quote:
Originally Posted by project1972
Use something like this.
string ok_trade;
int direction;
direction=GlobalVariableGet(ok_trade);
|
Also in the init section you shold set the global variable if it was not set by the indicator before the EA try to read it.
void init()
{
if (!GlobalVariableCheck(ok_trade)) GlobalVariableSet(ok_trade,0);
return(0);
}
and in the start function you can read it without errors
direction=GlobalVariableGet(ok_trade);