forked from e187038/SP_GVA1
52 lines
2.3 KiB
MQL5
52 lines
2.3 KiB
MQL5
|
|
//+------------------------------------------------------------------+
|
|
//| Expert tick function |
|
|
//+------------------------------------------------------------------+
|
|
int x;
|
|
int y=5,z=4;
|
|
bool b;
|
|
string mensaje;
|
|
int L;
|
|
|
|
void OnTick()
|
|
{
|
|
//---
|
|
|
|
|
|
mensaje="Hola pepe";
|
|
mensaje=mensaje+"hola pepe";
|
|
Print (mensaje,L=__LINE__);
|
|
x=z+y;
|
|
Print (x,L=__LINE__);
|
|
x=z-y;
|
|
Print (x,L=__LINE__);
|
|
x=z*y;
|
|
Print (x,L=__LINE__);
|
|
x=z/y;
|
|
Print (x,L=__LINE__);
|
|
b=(z>y);
|
|
Print (!b,L=__LINE__);
|
|
z=x%y;
|
|
z++;
|
|
|
|
double normalA = 1.35874934;
|
|
double normalB = 1.35873692;
|
|
normalA = NormalizeDouble(normalA,4);
|
|
// Result: 1.3587
|
|
normalB = NormalizeDouble(normalB,4);
|
|
// Result: 1.3587
|
|
|
|
|
|
if (normalA==normalB)
|
|
Print ("Igualicos",L=__LINE__);
|
|
else
|
|
Print ("Diferente",L=__LINE__);
|
|
|
|
//DASHBOARD
|
|
Comment("© Singularity Partners 2024--","\n",
|
|
"x: ",x, " y: ",y," Z: ",z," normalB: ",normalB," CODE LINE:",__LINE__,"\n"
|
|
);
|
|
|
|
|
|
}
|
|
//+------------------------------------------------------------------+
|