1
0
Fork 0
forked from e187038/SP_GVA1
SP_GVA1/SP_Pedro1/Homework1/SP_Pedro_Chapter04.mq5

48 lines
2.9 KiB
MQL5
Raw Permalink Normal View History

2025-05-30 16:25:41 +02:00
<EFBFBD><EFBFBD>//+------------------------------------------------------------------+
//| SP_Pedro_Chapter04.mq5 |
//+------------------------------------------------------------------+
#property version "1.00"
// Pausa de 1 segundo entre cada mensaje
#define PAUSA 2000 // 1000 milisegundos = 1 segundo
long numTicks=0;
int x=0;
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
//---
int resto;
uint startvalor=GetTickCount(); //se obtienen los milisegundos desde que inicio el sistema, se pone a 0 cada 49,7 d<EFBFBD>as.
Print ("inicio del ontick");
numTicks++;
// Esperar durante un per<EFBFBD>odo de tiempo
//datetime tiempoInicio = TimeLocal();
//Print ("Acabo de asignar un datetime ",tiempoInicio);
/*while (TimeLocal() - tiempoInicio < PAUSA)
{
Print (TimeLocal()," ",tiempoInicio);
}// Pausa de 1 segundo entre cada mensaje*/
Print ("antes del if");
resto=(int) numTicks % PAUSA;
if (resto==0)
if (x<5)
x++;
else
x=0;
//DASHBOARD
Comment("<00> Singularity Partners 2024","\n",
"num_ticks ",numTicks,"\n",
"x: ",x, " CODE LINE:",__LINE__,"\n",
" start valor: ",startvalor);
}
//+------------------------------------------------------------------+