PLEASE HELP - EA giving 2 Errors

 

Good Day..i need help with running this E without Errors....It is Giving Me two specific errors "Unexpected End Of Program" & "Unbalanced Paranthesis"


"Unexpected End Of Program Error"

This IS The Code

 // Create a chart ouput

  Comment (

           "The current signal is: ",signal,"\n",

           "AwesomeValue: "(DoubleToString(AwesomeOscillatorValue),"\n",

           "Buy Signal Value: ",SignalValue,"\n",

           "Sell Signal Value; "0-SignalValue),"\n",

           }

  

AND FOR THE UNBALANCED PARENTHESIS" error


void OnTick()

 {

  // We Calculate The Ask Price

  double Ask=NormalizeDouble(SymbolInfoDouble{{_Symbol,SYMBOL_ASK),_Digits};

  

  // We Calculate the Bid Price

  double Bid=NormalizeDouble(SymbolInfoDouble{_Symbol,SYMBOL_BID),_Digits;};

  

  // Create A string for the signal

  string signal-"";
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Symbol Properties
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Symbol Properties
  • www.mql5.com
To obtain the current market information there are several functions: SymbolInfoInteger(), SymbolInfoDouble() and SymbolInfoString(). The first parameter is the symbol name, the values of the second function parameter can be one of the identifiers of ENUM_SYMBOL_INFO_INTEGER, ENUM_SYMBOL_INFO_DOUBLE and ENUM_SYMBOL_INFO_STRING. Some symbols...
 
It says what you ave to do: check your paranthesis!
 
Carl Schreiber:
It says what you ave to do: check your paranthesis!

Im sorry but im very new to coding and dont understand a thing..I simply wanted to code this simple EA i copy and pasted the code from some guy on Youtube. I now made a couple tweaks to the end of program error and now i have only 1 error


"Expressions are not allowed in a global scope" 

and when i erase the "(" i get 42 errors


Please help me out.


Thank you


New code 


void OnTick();

 (

  // We Calculate The Ask Price

  double Ask=NormalizeDouble(SymbolInfoDouble{{_Symbol,SYMBOL_ASK),_Digits};



  // We Calculate the Bid Price

  double Bid=NormalizeDouble(SymbolInfoDouble{_Symbol,SYMBOL_BID),_Digits;};

  

  // Create A string for the signal

  string signal-"";

  

  // Create an array for prices

  MqlRates PriceInformation[];

Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Symbol Properties
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Symbol Properties
  • www.mql5.com
To obtain the current market information there are several functions: SymbolInfoInteger(), SymbolInfoDouble() and SymbolInfoString(). The first parameter is the symbol name, the values of the second function parameter can be one of the identifiers of ENUM_SYMBOL_INFO_INTEGER, ENUM_SYMBOL_INFO_DOUBLE and ENUM_SYMBOL_INFO_STRING. Some symbols...
 
IG Uniiverse:

Please edit your posts and

use the code button (Alt+S) when pasting code

 

Forum on trading, automated trading systems and testing trading strategies

When you post code please use the CODE button (Alt-S)!

Use the CODE button


 
  Comment (  «««««««««««««« Open parentheses
           "The current signal is: ",signal,"\n",
           "AwesomeValue: "(DoubleToString(AwesomeOscillatorValue),"\n",
           "Buy Signal Value: ",SignalValue,"\n",
           "Sell Signal Value; "0-SignalValue),"\n", ««««««« missing token after last comma.
           } ««««««««««««««««« Closing brace without opening brace. No closing parentheses.
 
William Roeder:

Thanks William. 


Though it seems everything is okay except the one error im getting of "Expressions not allowed on a global scope"


Sending me to the line after the void tick

Heres the code 

void OnTick();

 (

  // We Calculate The Ask Price

  double Ask=NormalizeDouble(SymbolInfoDouble{{_Symbol,SYMBOL_ASK),_Digits};



  // We Calculate the Bid Price

  double Bid=NormalizeDouble(SymbolInfoDouble{_Symbol,SYMBOL_BID),_Digits;};

  

  // Create A string for the signal

  string signal-"";

  

  // Create an array for prices

  MqlRates PriceInformation[];
 
void OnTick();

; not required

Reason: