An error puzzle

 

A friendly HELLO to all you good people!


Trying to compile the attached file Acdat01.mq4 gives this error:


'\end_of_program' unbalanced left parenthesis

Clicking on the error doesn't take me to the place in the code where the parenthesis is missing ... it does show (143,1) but I can't see any missing parenthesis anywhere ... any idea what's wrong here?


Thanks for any suggestions!

Files:
acdat01.mq4  5 kb
 
Opti Can see at least four problems, but 'fixing' them might change the intended logic... See this link for some programs that would highlight potential lines at issue http://www.google.co.uk/search?hl=en&q=free+compiler+c%2B%2B+highlight+errors+free&btnG=Search&meta= Good Luck -BB-
 
( <------------------------------------------------------probably this one unmatched (or unnecessay)
if (OrderType() == OP_SELL && prof > takeprofit)
{
 

Hi Du,

weniger über andere Lachen und mehr auf die "(" und ")" aufpassen dann passt es.

Wenn ich mit eine kleine Anmerkung erlauben darf: Du wirst nicht viele Orders machen mit dem Code ...

Einereits prüfst Du auf den Anfang der Bar mit if Time == prevtime ... andererseits vergleichst Du den aktuellen Open mit aktuellem Close (Close[0]).

das Close[0] änder seinen Wert in der laufenden Bar, und das wirst Du nie erreichen da Du vorher mit if Time[0]=prevtime ... aussteigst :-)

Lieben Gruß vom Wienerschnitzel....

Files:
acdat01_1.mq4  5 kb
 
phy wrote >>
( <------------------------------------------------------probably this one unmatched (or unnecessay)
if (OrderType() == OP_SELL && prof > takeprofit)
{

Yes Sir, that one was unnecessary ... I removed it and still, the error is still there ... :(

BB - these are great resources ... will have to get something like that ... just can't spend the rest of my life searching for a missing parenthesis ... ahahaha

Danke schoen fuer den guten Rat aus Wien ... in welchen Bezirk bist Du zuhause? Ich bin Auslands-Jedleseer aus Floridsdorf, dem 21; ... :)

http://www.dorfwiki.org/wiki.cgi?FranzHrazdirasome

 
opti wrote >>

Yes Sir, that one was unnecessary ... I removed it and still, the error is still there ... :(

BB - these are great resources ... will have to get something like that ... just can't spend the rest of my life searching for a missing parenthesis ... ahahaha

Danke schoen fuer den guten Rat aus Wien ... in welchen Bezirk bist Du zuhause? Ich bin Auslands-Jedleseer aus Floridsdorf, dem 21; ... :)

http://www.dorfwiki.org/wiki.cgi?FranzHrazdirasome

Gerne, im attached EA ist auch das Klammer Problem schon erledigt gewesen, hast gesehen?

Im Moment arbeite ich nur mehr in Wien und bin Auslands-Burgenländer :-)

 
viennatrader wrote >>

Gerne, im attached EA ist auch das Klammer Problem schon erledigt gewesen, hast gesehen?

Im Moment arbeite ich nur mehr in Wien und bin Auslands-Burgenländer :-)

Hab es mir soeben angeschaut und mit zwei Bemerkungen versehen. Der Kompiler ist jetzt froh zum Glueck! Deine Verbesserung war zwar nicht ganz richting, hat aber zur Loesung des Problemes gefuehrt ... wofuer ich Dir recht dabkbar bin ... :)

Files:
Reason: