extern datetime thedate=(i want to insert today's date here)

 
hi. i need help

extern datetime thedate=( i want to insert today's date here )

how?

i tried TimeDay(CurTime()) but it didnt work
 

You can't do that. You can only initialize variables with constants before start()

int a = 2;
int b = 2+2;   // error -- '+' - comma or semicolon expected 
int c = a + b; // error -- 'a' - initialization expected 
               // error -- '+' - comma or semicolon expected 
               // error -- 'b' - expression on global scope not allowed 
 
int start(){
   return(0);
}
 
kotarosan:
hi. i need help

extern datetime thedate=( i want to insert today's date here )

how?

i tried TimeDay(CurTime()) but it didnt work


You can do such

extern datetime thedate=0;
 
....
int init()
{
...
if (thedate=0) thedate=TimeCurrent();
...
}
 
thanks to phy and Rosh.

it helps me to determine the start of trend or reversal ( i think so)

:)