SOS

[Deleted]  

could someone help me please?

i've been spending all night trying to build my very first ea, but this is what i got '\end_of_program'-unbalanced left parenthesis, what does it mean? i tried to check one by one but the end product is always error.

Files:
[Deleted]  

These lines:

                if(OrderOpenPrice()-Ask)>(Point*TrailingStop)
                  {
                    if((OrderStopLoss()>(Ask+Point*TrailingStop)) || (OrderStopLoss()==0)

...have way too many parentheses of both kinds. If you replace them with:

                if(OrderOpenPrice()-Ask>Point*TrailingStop)
                  {
                    if(OrderStopLoss()>Ask+Point*TrailingStop || OrderStopLoss()==0)

...it does compile. Disclaimer: I did not check the rest, neither overall program logic.

[Deleted]  
Drave:

These lines:

...have way too many parentheses of both kinds. If you replace them with:

...it does compile. Disclaimer: I did not check the rest, neither overall program logic.


Thanks for the help Drave, i did exactly like you said, but the error seems increasing. my idea was just trying to execute order buy or close and sell or close whenever the short ema crosses the long sma, looks so simple but apparently not so simple for me
[Deleted]  
martinnugo:

Thanks for the help Drave, i did exactly like you said, but the error seems increasing. my idea was just trying to execute order buy or close and sell or close whenever the short ema crosses the long sma, looks so simple but apparently not so simple for me
See attachment - it does compile without errors.
Files:
[Deleted]  
Drave:
See attachment - it does compile without errors.

Thank you very much, it does compile without errors, i'm going to check mine again line by line and try to find what went wrong.