Whats wrong here !

 

Hi there,

I am pretty new to MetaTrader 4 and are about to program a simply entry order. But everytime I compile I get these errors:

'{' - expression on global scope not allowed

'\end_of_program' no function defined

my code is:

{
   int ticket;
   double Start_time = 0.00;

   
   if( TimeCurrent() == Start_time )
   {
      ticket=OrderSend(Symbol(),OP_BUY,0.01,Ask+0.00390,3,,(Ask+0.00420));
      
   }
     
         
}         

can someone help me out ?

 
rexden1:

Hi there,

I am pretty new to MetaTrader 4 and are about to program a simply entry order. But everytime I compile I get these errors:

'{' - expression on global scope not allowed

'\end_of_program' no function defined


What function is this from ? start(), init() or deinit() ? please show all your code.
 

Except for common variables (globally declaried variables) ALL code must be inside a function. learn to code.

What you posted is the equivalent of baby talk, total nonsense. A) Buy not at Ask. B) missing arguments. C) comparing datetime with double D) no functions.

 
rexden1:

Hi there,

I am pretty new to MetaTrader 4 and are about to program a simply entry order. But everytime I compile I get these errors:

'{' - expression on global scope not allowed

'\end_of_program' no function defined

my code is:

can someone help me out ?


Somewhere you missed a { just check if all { have a } closing pair
Reason: