Download MetaTrader 5

Why this program can not work?

To add comments, please log in or register
Bruce
30
Bruce  
void OnTick()
{
//---
int TicketYear=TimeYear(TimeCurrent());
int TicketMonth=TimeMonth(TimeCurrent());
int TicketDay=TimeDay(TimeCurrent());
if(TicketYear==2013&&TicketMonth==7)
{
Print("My Year is",TicketYear);

}

PS: There is no print in log.

Tjipke de Vries
6433
Tjipke de Vries  
19842008:
void OnTick()
{
//---
int TicketYear=TimeYear(TimeCurrent());
int TicketMonth=TimeMonth(TimeCurrent());
int TicketDay=TimeDay(TimeCurrent());
if(TicketYear==2013&&TicketMonth==7)
{
Print("My Year is",TicketYear);

}

PS: There is no print in log.

void OnTick()
{
//---
int TicketYear=TimeYear(TimeCurrent());
int TicketMonth=TimeMonth(TimeCurrent());
int TicketDay=TimeDay(TimeCurrent());
if(TicketYear==2013&&TicketMonth==7)
{
Print("My Year is",TicketYear);
}
Use SRC button....
Might be your broker is not living in juli 2013 ....
Keith Watford
Moderator
10533
Keith Watford  
Because it is not July 2013
Syed Naufal Gaddafi
1468
Syed Naufal Gaddafi  
void OnTick()
{
//---
int TicketYear=TimeYear(TimeCurrent());
int TicketMonth=TimeMonth(TimeCurrent());
int TicketDay=TimeDay(TimeCurrent());
if(TicketYear==2013&&TicketMonth==7)
{
Print("My Year is",TicketYear);

}

Change that to 2014.

Change ticket month too.

Alain Verleyen
Moderator
35125
Alain Verleyen  
19842008:
void OnTick()
{
//---
int TicketYear=TimeYear(TimeCurrent());
int TicketMonth=TimeMonth(TimeCurrent());
int TicketDay=TimeDay(TimeCurrent());
if(TicketYear==2013&&TicketMonth==7)
{
Print("My Year is",TicketYear);

}

PS: There is no print in log.

Please don't double post. I have to remove your other topic.
To add comments, please log in or register