93 lines
5 KiB
MQL4
//+------------------------------------------------------------------+
| |||
//| Config.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 ICTLIBRARY_BASE_CONFIG_MQH
| |||
#define ICTLIBRARY_BASE_CONFIG_MQH
| |||
| |||
//+------------------------------------------------------------------+
| |||
//| |
| |||
//+------------------------------------------------------------------+
| |||
#include "Defines.mqh"
| |||
| |||
//--- Antes de incluir la lib por favor defina esto con una instancia o punetero de CNewBarManager (GeneralByLeo\\TFManager\\Main.mqh)
| |||
// DE LO CONTRARIO NO COMPILARA
| |||
// #define TSN_ICTLIBRARY_INSTANCE_BAR_MANAGER
| |||
| |||
//---
| |||
#define TSN_ICTLIBRARY_ENABLE_CONFIG
| |||
| |||
//+------------------------------------------------------------------+
| |||
//| |
| |||
//+------------------------------------------------------------------+
| |||
#ifdef TSN_ICTLIBRARY_ENABLE_CONFIG
| |||
| |||
//+------------------------------------------------------------------+
| |||
| |||
| |||
//--- Configuracion de defines esto para que otras clases que usan controler fast puedan decidir si usar
| |||
// El que trae la bilioteca o uno custom, o directamente CBarControler Fast o normal
| |||
| |||
//--- Habilitamos el uso del manager
| |||
#define TSN_GLOBAL_USE_NEWBAR_MANAGER
| |||
| |||
//--- Creamos el define, este servira como incilizador..
| |||
// Este define es necesario en caso usted com ousuario NO quiere usar el manager que trae la libreria puede hacer undef y luego define
| |||
// Otravez este define con el de CNewBarManager::....
| |||
#define TSN_GLOBAL_NEWBAR_MANAGER_CREATE(timeframe, idx) (TSN_ICTLIBRARY_INSTANCE_BAR_MANAGER.GetPosExecute(timeframe, idx))
| |||
| |||
//--- Definamos otro define llamado execute
| |||
#define TSN_GLOBAL_NEWBAR_MANAGER_CHEK(idx) (TSN_ICTLIBRARY_INSTANCE_BAR_MANAGER.m_is[idx])
| |||
| |||
| |||
// Estos definan se definen para que en caso usted incluya un modulo de MQLArticles, etc que requiera un controlador de aperutra
| |||
// de velas, se use automaticamente el de la libreria, en caso usted incluya la libreira a su proyecto pero no la use en absoluto..
| |||
// Le recomeindios hacer dos cosas
| |||
// Si reuqiere veriifcar aperutras de velas a pocos timeframes entonces no use el CNewBarManager.. por lo que los defines e veran de la siguiente manera
| |||
// Lo que ud haria seria hacer #undef a todos los defines (3) luego de incluir ICTConcpeots a su proyecto..
| |||
// En caso usted quiere usar el manager PERO No el de la libreria.. entonces los 3 defines se veran asi
| |||
/*
| |||
// Dejamos el define 1 tal cual
| |||
#define TSN_GLOBAL_USE_NEWBAR_MANAGER
| |||
| |||
// Lo demas lo modificamso
| |||
#define TSN_GLOBAL_NEWBAR_MANAGER_USE(timeframe, idx) CNewBarManager::RegisterTimeframe(timeframe, idx)
| |||
#define TSN_GLOBAL_NEWBAR_MANAGER_CHEK(idx) CNewBarManager_IsNewBar(idx)
| |||
*/
| |||
| |||
#endif // TSN_ICTLIBRARY_ENABLE_CONFIG
| |||
| |||
//+------------------------------------------------------------------+
| |||
//| |
| |||
//+------------------------------------------------------------------+
| |||
//--- Configuration of defines so that other classes using controler fast can decide whether to use
| |||
// The one included in the library or a custom one, or directly CBarControler Fast or normal
| |||
//--- Enable the use of the manager
| |||
// #define TSN_GLOBAL_USE_NEWBAR_MANAGER
| |||
//--- Create the define, this will serve as initializer..
| |||
// This define is necessary in case you as a user DO NOT want to use the manager included in the library, you can undef and then define
| |||
// Again this define with CNewBarManager::....
| |||
// #define TSN_GLOBAL_NEWBAR_MANAGER_CREATE(timeframe, idx) CNewBarManager_RegisterTimeframe(timeframe, idx)
| |||
//--- Define another define called execute
| |||
// #define TSN_GLOBAL_NEWBAR_MANAGER_CHEK(idx) CNewBarManager_NewBar(idx)
| |||
// These defines are defined so that in case you include a module from MQLArticles, etc that requires a bar opening controller
| |||
// it automatically uses the one from the library. In case you include the library in your project but don't use it at all..
| |||
// I recommend doing two things
| |||
// If you need to check bar openings on few timeframes then don't use CNewBarManager.. so the defines would look like this
| |||
// What you would do is #undef all the defines (3) after including ICTConcepts in your project..
| |||
// In case you want to use the manager BUT NOT the one from the library.. then the 3 defines would look like this
| |||
/*
| |||
// Leave define 1 as is
| |||
#define TSN_GLOBAL_USE_NEWBAR_MANAGER
| |||
// Modify the rest
| |||
#define TSN_GLOBAL_NEWBAR_MANAGER_USE(timeframe, idx) CNewBarManager::RegisterTimeframe(timeframe, idx)
| |||
#define TSN_GLOBAL_NEWBAR_MANAGER_CHEK(idx) CNewBarManager_IsNewBar(idx)
| |||
*/
| |||
| |||
#endif // ICTLIBRARY_BASE_CONFIG_MQH
| |||
//+------------------------------------------------------------------+
|