set variables in init function of indicator
Assuming that you set a value for the extern "margin"
string symbol; if (symbol == "USDCHF") { loc_margin = margin / 100000; } else if (symbol == "USDJPY") { loc_margin = margin / 1000; }
loc_margin will not be assigned a value because symbol has not been assigned a value, so the only way that loc_margin can be given a value is by un-commenting-
// loc_margin = margin / 100000; //!
Thanks for pointing that out.
Hi,
if I use the following indicator with USDCHF, I get different results, depending on whether the line marked with //! is uncommented or not.
Why?