forked from e187038/SP_GVA1
60 lines
3.7 KiB
MQL5
60 lines
3.7 KiB
MQL5
|
|
#property copyright "Copyright 2024_SingularityPartners"
|
|
#property link "https://www.mql5.com"
|
|
|
|
|
|
#define PI 3.14159265358979323846;
|
|
#define MENSAJE "Bienvenidos a un mundo de riqueza "
|
|
|
|
#include <Temperatura.mqh> //Este mqh está metido en el include.
|
|
#include "SP_Pedro_MiClase.mqh" //Este mqh se ha metido en el mismo directorio que el programa base.
|
|
#include "Includes/SP_Pedro_MisFechas.mqh"
|
|
|
|
const double pipi=3.14159265358979323846;
|
|
double termometro=0.0;
|
|
double numerico;
|
|
datetime fechaactual=TimeCurrent();
|
|
|
|
int OnInit()
|
|
{
|
|
//---
|
|
|
|
//---
|
|
return(INIT_SUCCEEDED);
|
|
}
|
|
//+------------------------------------------------------------------+
|
|
//| Expert deinitialization function |
|
|
//+------------------------------------------------------------------+
|
|
void OnDeinit(const int reason)
|
|
{
|
|
//---
|
|
|
|
}
|
|
//+------------------------------------------------------------------+
|
|
//| Expert tick function |
|
|
//+------------------------------------------------------------------+
|
|
void OnTick()
|
|
{
|
|
//---
|
|
Print ("LA fecha actual me sale ",fechaactual);
|
|
termometro = CelsiusAFarenheit (39.99);
|
|
Print ("Temperatura en FAREN JEI ",termometro);
|
|
|
|
// Crear un objeto de la clase MiClase con valores iniciales
|
|
MiClase objeto(5, 3.14);
|
|
|
|
// Obtener y mostrar el valor de variable1
|
|
Print("El valor de variable1 es: ", objeto.ObtenerVariable1());
|
|
|
|
// Obtener y mostrar el valor de variable2
|
|
Print("El valor de variable2 es: ", objeto.ObtenerVariable2());
|
|
|
|
// Cambiar el valor de variable1
|
|
objeto.EstablecerVariable1(10);
|
|
// no admite PI*PI;
|
|
numerico=MathPow(pipi,3);
|
|
Print (MENSAJE,numerico);
|
|
Print (diadelasemana(fechaactual));
|
|
|
|
}
|
|
//+------------------------------------------------------------------+
|