67 righe
2,4 KiB
MQL5
67 righe
2,4 KiB
MQL5
//+------------------------------------------------------------------+
|
|
//| Global.mqh |
|
|
//| Copyright 2025, Niquel Mendoza. |
|
|
//| https://www.mql5.com/es/users/nique_372 |
|
|
//+------------------------------------------------------------------+
|
|
#property copyright "Copyright 2025, Niquel Mendoza."
|
|
#property link "https://www.mql5.com/es/users/nique_372"
|
|
#property strict
|
|
|
|
#ifndef GLOBAL_MQH
|
|
#define GLOBAL_MQH
|
|
|
|
// Archivo Global.mqh aqui se ubican todas las incilizacion GLOBALES antes de OnInit
|
|
// En este caso la libreria ICT Easy
|
|
// SIEMPRE SE DEBERA DE INCLUIR ESTO ANTES DE INSTANCIAR O EJECUTAR CUALUIQER CONCEPTO ICT
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
#include <TSN\\MQLArticles\\Utils\\TFManager.mqh>
|
|
|
|
//--- Instancia de new bar manager
|
|
CNewBarManager g_new_bar_manager;
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
// El objetto del manager se intancia primero antes de incluir ICTLibraryEasy
|
|
// La libreria requiere saber... cual es el manager que usara..
|
|
// Incluimos los componentes de la lib que usaremos
|
|
#include "..\\Src\\ICTConcepts.mqh"
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
class CGlobal
|
|
{
|
|
private:
|
|
static bool init;
|
|
|
|
public:
|
|
//--- Incializacion global
|
|
CGlobal(void)
|
|
{
|
|
if(init)
|
|
return;
|
|
|
|
|
|
//--- Seteasmos el bar manager
|
|
ICTGen_BarManagerSet(GetPointer(g_new_bar_manager)); // Le damos a la libreira ICT el manager
|
|
|
|
//---
|
|
init = true;
|
|
}
|
|
//--- Deinicializacion global
|
|
~CGlobal(void)
|
|
{
|
|
|
|
}
|
|
};
|
|
//+------------------------------------------------------------------+
|
|
bool CGlobal::init = false;
|
|
|
|
//+------------------------------------------------------------------+
|
|
CGlobal g_global_instance;
|
|
//+------------------------------------------------------------------+
|
|
#endif // GLOBAL_MQH
|