Audience
For MQL5 builders whose EA stops at an undeclared identifier, missing variable, missing function, missing enum, missing include, or unresolved trade object.
MQL5 compiler blocker
Fix MQL5 undeclared identifier errors by identifying whether the missing name should be an input, local variable, function, enum, include, or trade object before recompiling.
Common undeclared-identifier evidence
'trade' - undeclared identifier 'RiskPercent' - undeclared identifier 'GetSignal' - undeclared identifier 'ORDER_TYPE_BUY' - undeclared identifier 'iMAValue' - undeclared identifier
These can be different root causes: missing CTrade setup, missing input, missing helper function, wrong include, or a value declared in the wrong scope.
Audience
For MQL5 builders whose EA stops at an undeclared identifier, missing variable, missing function, missing enum, missing include, or unresolved trade object.
Problem
Undeclared identifier errors often create a long MetaEditor cascade. The fastest repair is to classify the first missing name and declare it in the right scope instead of patching every later line.
Outcome
Workfusionapp keeps the repair path narrow: classify the missing name, fix scope, recompile the first blocker, preserve risk gates, and route the code into the free desk with clean evidence.
Support path
Start with the concrete blocker, keep the full EA context attached, then move to a reviewable output.
Later MetaEditor lines may be cascade errors. Fix the first unresolved identifier and recompile before editing unrelated strategy logic.
Inputs are for user settings, locals are for temporary calculations, helpers need function signatures, enums need the right include or definition, and trade calls need a visible CTrade object.
Avoid making every missing name global. Shared state should be deliberate EA state; temporary values should stay close to the function that uses them.
Workflow
The fix is not to add globals everywhere. The fix is to decide whether the name belongs as an input, local value, helper, enum, include, trade object, or persistent EA state.
Step 1
Paste the first compiler line
Step 2
Classify the missing identifier
Step 3
Declare it in the right scope
Step 4
Recompile and review the next blocker
Undeclared identifier handoff
Open the guide that matches the missing identifier type, then run the free desk with the first compiler line, surrounding code, include section, and intended behavior.
Use this when the first MetaEditor blocker is a missing variable, function, enum, input, include, or object name.
Use this when the missing name is trade, CTrade, trade.Buy, trade.Sell, or another execution object.
Use this when the undeclared identifier is only the first error in a longer MetaEditor compile cascade.
Send me the undeclared-identifier repair workflow
Opt in only if your MQL5 EA is blocked by an undeclared identifier, missing name, missing include, or compiler cascade. This captures the undeclared-identifier source for conversion measurement.
Choose the workflow you want, then opt in only if you want Workfusionapp updates.
No. Declare the name in the smallest correct scope unless it is real EA state that must persist across ticks.
No. It only removes one compile blocker. Compile, risk, tester, and demo review remain separate checks.
No. Use code, compiler errors, includes, function signatures, and logs. Workfusionapp does not need broker login.