124 lines
14 KiB
MQL5
124 lines
14 KiB
MQL5
//+------------------------------------------------------------------+
|
|
//| ICTConcepts.mqh |
|
|
//| Copyright 2025, Leo. |
|
|
//| https://www.mql5.com/es/users/nique_372/news |
|
|
//+------------------------------------------------------------------+
|
|
#property copyright "Copyright 2025, Leo."
|
|
#property link "https://www.mql5.com/es/users/nique_372/news"
|
|
#property strict
|
|
|
|
#ifndef ICT_LIBRARY_ALL_CONCEPTS_MQH
|
|
#define ICT_LIBRARY_ALL_CONCEPTS_MQH
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| Esp |
|
|
//+------------------------------------------------------------------+
|
|
/*
|
|
Los funciones que no tienen una "comentacion exaustiva" es por que pienso qeu no son tan complejas de entender.
|
|
*/
|
|
|
|
/*
|
|
Notas:
|
|
- Todas las funciones Create de todas las clases tienes el parametro "show_concept_" este le indica a la libreria ex5, si desde un inicio se visulizaran los objetos
|
|
o no, si es true, entonces no se dibujaran obejtos, y si usted intenta usar SetFlagMostra.. o ShowAll no funcionara.
|
|
|
|
- La diferencia entre HideAll y SetFlagMostrar... es que uno solo aplica para los obejtos del grafico (los que existe) y otro durara (teoricamente) hata la destruccion del objeto
|
|
- HideAll: Solo oculta los objetos dibujados en el graifoc, (LOS EXISTENTES), pero si luego se crea un obejto, entonces NO lo ocultara
|
|
- SetFalgMostrarObj, Esta funcoin Oculta para los objetos actuales, ademas de establecer internamente la bandera de visiibiidad a flase, por lo que si se crean nuevos
|
|
- obejtos graficos para dicho concepto a fuutro, se ocultaran automaticamente
|
|
|
|
- Algunas clases con CSwingBar o sesiones, heredan de CLoggerBase (para compatibilidad con CManagerBase), hay que recordar que unicamente las funciones AddLogFlags,
|
|
y RemoveLogFlags, funcionana, las demas no hacen NADA, dado que no modifican las banderas del handle interno.
|
|
|
|
- Cuando se menciona lo de "banderas de log" (usadas en RemoveLogFlags y AddLogFlags en todos los conceptos) estas banderas estan definidas en
|
|
MQLArticles\\Utils\\FA\\SimpleLogger
|
|
- #define LOG_LEVEL_ERROR 1 // 0001 - Critical errors
|
|
- #define LOG_LEVEL_WARNING 2 // 0010 - Warnings
|
|
- #define LOG_LEVEL_INFO 4 // 0100 - General information
|
|
- #define LOG_LEVEL_CAUTION 8 // 1000 - Cautions
|
|
*/
|
|
|
|
/*
|
|
Notas para los bloques: Fvg, Gap
|
|
- Nueva funcion añadida SetParo, con esta funcion estableces que en la siguiente llamada de OnNewBar de dichos conceptos, se hara un recalculo... osea que se hara un bucle
|
|
- y se verifica uno por uno si un fvg es mitigado etc, normalmente esto se optimiza unicamente verificando los mas cercanos.. esto es util si digamos se piensa suspender la
|
|
- llama a OnNewBar durante mas de 1 vela... o por mucho tiempo. por ejemplo cuando un limite de ganan diaria se supera y ya no queda nada mas por hacer en ese caso
|
|
- dentro del if que se llame cada vez que se supere dicho limite, se deberia de llamar a SetParo, o tambien DeleteAll, (Solo que deleteall, NO recalcula
|
|
- directamente elimina todos los obejtos, port lo que en la siguiente llamada a on new bar se perdera el progreso, o conceptos historicos)
|
|
*/
|
|
|
|
/*
|
|
- Como se menciono anteriormente si se pretende hacer un paro "o suspension" de la revision de conceptos, recomendamos hacer lo siguiente por cada concepto
|
|
- Nota: Para todos los conceptos se puede llamar DeleteAll, pero se pierde el hisotiral, todo se reinicia a 0, es como empezar desde 0.
|
|
|
|
- BosChoch: SetParo
|
|
- Fvg: SetParo
|
|
- TradingSession: Nada
|
|
- CSwingBarPure: Nada
|
|
- CSwingBarZigZag: SetParo
|
|
*/
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| Eng |
|
|
//+------------------------------------------------------------------+
|
|
/*
|
|
Functions that don't have "exhaustive documentation" are because I think they're not that complex to understand.
|
|
*/
|
|
|
|
/*
|
|
Notes:
|
|
- All Create functions across all classes have the "show_concept_" parameter, which tells the ex5 library whether objects
|
|
should be visualized from the start or not. If true, objects won't be drawn, and if you try to use SetFlagMostrar...
|
|
or ShowAll, it won't work.
|
|
- The difference between HideAll and SetFlagMostrar... is that one only applies to chart objects (existing ones) and
|
|
the other lasts (theoretically) until object destruction.
|
|
- HideAll: Only hides objects drawn on the chart (EXISTING ONES), but if an object is created later, it WON'T hide it.
|
|
- SetFlagMostrarObj: This function hides current objects, and also internally sets the visibility flag to false, so if
|
|
new graphic objects are created for that concept in the future, they will be automatically hidden.
|
|
- Some classes like CSwingBar or sessions inherit from CLoggerBase (for compatibility with CManagerBase). Remember that
|
|
only the AddLogFlags and RemoveLogFlags functions work; the others do NOTHING since they don't modify the internal
|
|
handle flags.
|
|
- When "log flags" are mentioned (used in RemoveLogFlags and AddLogFlags in all concepts), these flags are defined in
|
|
MQLArticles\\Utils\\FA\\SimpleLogger
|
|
- #define LOG_LEVEL_ERROR 1 // 0001 - Critical errors
|
|
- #define LOG_LEVEL_WARNING 2 // 0010 - Warnings
|
|
- #define LOG_LEVEL_INFO 4 // 0100 - General information
|
|
- #define LOG_LEVEL_CAUTION 8 // 1000 - Cautions
|
|
*/
|
|
|
|
/*
|
|
Notes for blocks: Fvg
|
|
- New function added: SetParo. With this function you set that on the next OnNewBar call for these concepts, a
|
|
recalculation will be performed... meaning a loop will run and verify one by one if an FVG is mitigated, etc.
|
|
Normally this is optimized by only checking the closest ones. This is useful if you plan to suspend the OnNewBar
|
|
call for more than 1 candle... or for a long time. For example, when a daily profit limit is exceeded and there's
|
|
nothing more to do. In that case, within the if statement that's called each time that limit is exceeded, you should
|
|
call SetParo, or also DeleteAll (though DeleteAll does NOT recalculate - it directly deletes all objects, so on the
|
|
next OnNewBar call, progress or historical concepts will be lost).
|
|
*/
|
|
|
|
/*
|
|
- As mentioned earlier, if you intend to perform a "pause" or "suspension" of concept revision, we recommend doing the
|
|
following for each concept:
|
|
- Note: DeleteAll can be called for all concepts, but history is lost, everything resets to 0, it's like starting from scratch.
|
|
|
|
- BosChoch: SetParo
|
|
- Fvg: SetParo
|
|
- TradingSession: Nothing
|
|
- CSwingBarPure: Nothing
|
|
- CSwingBarZigZag: SetParo
|
|
*/
|
|
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
#include "Base\\Data.mqh"
|
|
#include "Base\\Functions.mqh"
|
|
|
|
#include "Concepts\\BosChoch.mqh"
|
|
#include "Concepts\\Fvg.mqh"
|
|
#include "Concepts\\TradingSession.mqh"
|
|
#include "Concepts\\Swings.mqh"
|
|
|
|
#endif
|
|
//+------------------------------------------------------------------+
|