'start' - function can be declared only in the global scope
-
Is anyone else getting this error when exporting?
**"'start' - function can be declared only in the global scope" **
it keeps coming up. I'm wondering if its on my end.
I'm referencing a custom indicator, could this be related?
-
I don't know what you are doing, but in MQL4/MQL5 you can't define function within another function, all functions are on the same level
-
We're trying to export an EA that has a custom indicator in the "My Indicators List"
Any EA using built in indicators export fine; however any time a condition references our custom indicator (which has exported fine over the past two weeks) it returns this error when trying to export.
Just in the past two or three days this error has cropped up. -
Very strange, I see this for the first time. Somehow this appears in the code:
void iCustom() { //---- Read value from trend and signal buffer int start() { // Read values double trend = iCustom(Symbol(), Period(), "PZ_LopezTrend_LICENSENUM", 5, 1); double signal = iCustom(Symbol(), Period(), "PZ_LopezTrend_LICENCESUM", 6, 1); // Do something if(trend == OP_BUY) { /* Your code if trend is currently bullish */ } if(trend == OP_SELL) { /* Your code if trend is currently bearish */ } if(signal == OP_BUY) { /* Your code for bullish trend change */ } if(signal == OP_SELL) { /* Your code for bearish trend change */ } // Exit return(0); } return; }.. but I don't recognize this code and I can't see how it's injected into the code. Do you have some idea?