[Help] Proper syntax but still getting "error 228: 'input' - name expected"

 
Hello everyone! Even though I'm fairly new I do believe that this shouldn't be happening and I'm getting this "bug" both on my MT5 IDE and when using the compiler from the CMD... Here is the problem

#property strict
#property copyright     "Marco Valentino Alvarado"
#property link          ""
#property description   "Asesor experto que aplica una estrategia de trading que funciona en un mercado en rango."
#property version       "1.00"
#include "../headers/Event.mqh"

input ulong eaUniqueIdentifier = 101; // This is what you might call the Magic Number but the purpose is pointless because I get the error message below, this is line 32 on my code.

This is the error that I get even though the name exists and the syntax seems correct:

'input' - name expected proofOfConcept.mq5 32 1

By just calling the compiler "metaeditor64.exe" like this:

metaeditor64.exe /compile:proofOfConcept.mq5 /s /log

Note: "metaeditor64.exe" is on my Path environment variable on Windows 11 so that I can compile my mq5 files by using PowerShell when using Microsoft Visual Studio.


I also get this error, this is the output of the above command:


PS C:\Users\marco\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Experts\My Expert Advisors\src> m64 /compile:proofOfConcept.mq5 /s /log


proofOfConcept.log


proofOfConcept.mq5 : information: checking 'proofOfConcept.mq5'

proofOfConcept.mq5 : information: including ..\headers\Event.mqh

proofOfConcept.mq5(32,1) : error 228: 'input' - name expected

 : information: result 1 errors, 0 warnings

If you want, I can also provide screenshots, I have absolutely no idea what to do, I was following a tutorial and got stuck here. Even worst, there is another twist. Look at this code:

#property strict
#property copyright     "Marco Valentino Alvarado"
#property link          ""
#property description   "Asesor experto que aplica una estrategia de trading que funciona en un mercado en rango."
#property version       "1.00"
#include "../headers/Event.mqh"

input group "─ ─ ─ Expert Advisor related inputs" // Now the error is on this line, name expected!!! This is line 30

input ulong MagicNumber = 101;

input group "─ ─ ─ Indicator related inputs"

input int context = 4;
input int maPeriod = 7;
input ENUM_MA_METHOD maMethod = MODE_SMA;
input int shiftMA = 0;
input ENUM_APPLIED_PRICE appliedPrice = PRICE_CLOSE;

input group "─ ─ ─ Risk control related inputs"

The error message on the Powershell:

PS C:\Users\marco\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Experts\My Expert Advisors\src> m64 /compile:proofOfConcept.mq5 /s /log


proofOfConcept.log


proofOfConcept.mq5 : information: checking 'proofOfConcept.mq5'

proofOfConcept.mq5 : information: including ..\headers\Event.mqh

proofOfConcept.mq5(30,1) : error 228: 'input' - name expected

 : information: result 1 errors, 0 warnings


Even better, take a look at the MT5 IDE throwing the exact same error (See image attached)


 
Marco Valentino: This is the error that I get even though the name exists and the syntax seems correct:

'input' - name expected proofOfConcept.mq5 32 1

Your problem is above that line, in the include file, which you do not show.

 
William Roeder #:

Your problem is above that line, in the include file, which you do not show.

My answer will be updated right now.


#property strict
#property copyright     "Marco Valentino Alvarado"
#property link          ""
#property description   "Asesor experto que aplica una estrategia de trading que funciona en un mercado en rango."
#property version       "1.00"
#include "../headers/Event.mqh" // Is this the line causing problems on my code? 

/*
    EA Enumeraciones
*/
/*
    Variables Input y Globales
*/

sinput group "─ ─ ─ Expert Advisor related inputs"

input ulong MagicNumber = 101;

sinput group "─ ─ ─ Indicator related inputs"

input ushort context = 4;
input int maPeriod = 7;
input ENUM_MA_METHOD maMethod = MODE_SMA;
input int shiftMA = 0;
input ENUM_APPLIED_PRICE appliedPrice = PRICE_CLOSE;

sinput group "─ ─ ─ Risk control related inputs"


In case you want to know what's written on "Event.mqh":

class Event {
    /*
        Public attributes and functions
    */
    public:
    Event(int c) { 
        Print("Event instance...");
        context = c; 
    } // Constructor
    MqlRates priceBar[];
    bool scan(){
        int i;
        for (i=0;i<context-1;i++){
            Print("Scanning price action...", priceBar[i].close);
        }
        return false;
    }
    /*
        Private attributes and functions
    */
    private:
    int context;
    void setUpPriceBarArray(){ ArraySetAsSeries(priceBar, true); } // 
    void update(){
        CopyRates(_Symbol, PERIOD_CURRENT, 0, context, priceBar);
    }
}
 
sinput group "─ ─ ─ Risk control related inputs"«My guess is the file ends here. Add a return and recompile.»