2025-12-09 13:32:01 -05:00 | | | //+------------------------------------------------------------------+
|
| | | //| HighLowZones.mq5 |
|
| | | //| 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 version "1.00"
|
| | | #property strict
|
| | |
|
2026-02-01 13:11:51 -05:00 | | | #define DEFGLOBAL_SIMPLE
|
2026-01-06 06:46:34 -05:00 | | | #include "..\\..\\DefGlobal.mqh"
|
| | |
|
| | | //+------------------------------------------------------------------+
|
| | | //| |
|
| | | //+------------------------------------------------------------------+
|
| | | int8_t idx_controler_d1 = INVALID_INDEX;
|
2026-02-14 17:50:28 -05:00 | | | CLow_High_Zones low_highs(_Symbol, 0, 0, _Period,true);
|
2025-12-09 14:54:11 -05:00 | | |
|
2025-12-09 13:32:01 -05:00 | | |
|
| | | //+------------------------------------------------------------------+
|
| | | //| Expert initialization function |
|
| | | //+------------------------------------------------------------------+
|
| | | int OnInit()
|
| | | {
|
| | | //---
|
2026-01-06 06:46:34 -05:00 | | | g_new_bar_manager.GetPosExecute(PERIOD_D1, idx_controler_d1);
|
2025-12-09 13:32:01 -05:00 | | |
|
| | | //--- indicator buffers mapping
|
| | | low_highs.AddItem(PERIOD_D1, clrBlue, clrRed, clrRed, clrBlue, STYLE_DASHDOTDOT, 1);
|
| | | low_highs.AddItem(PERIOD_W1, clrBlue, clrRed, clrRed, clrBlue, STYLE_DASHDOTDOT, 1);
|
| | |
|
| | | //---
|
| | | return(INIT_SUCCEEDED);
|
| | | }
|
| | | //+------------------------------------------------------------------+
|
| | | //| Expert deinitialization function |
|
| | | //+------------------------------------------------------------------+
|
| | | void OnDeinit(const int reason)
|
| | | {
|
| | | //---
|
2026-02-01 13:11:51 -05:00 | | | ICTGen_OnDeinitEvent(reason);
|
2025-12-09 13:32:01 -05:00 | | | }
|
| | | //+------------------------------------------------------------------+
|
| | | //| Expert tick function |
|
| | | //+------------------------------------------------------------------+
|
| | | void OnTick()
|
| | | {
|
| | | //---
|
| | | const datetime curr_time = TimeCurrent();
|
2026-01-06 06:46:34 -05:00 | | | g_new_bar_manager.Execute(curr_time);
|
2025-12-09 13:32:01 -05:00 | | |
|
| | | //---
|
2026-01-06 06:46:34 -05:00 | | | if(CNewBarManager_IsNewBarM1(g_new_bar_manager))
|
| | | {
|
| | | const bool new_day = CNewBarManager_IsNewBar(g_new_bar_manager, idx_controler_d1);
|
| | | ICTGen_FuncionOnBarM1(new_day, curr_time);
|
| | | low_highs.OnNewBarM1();
|
| | | }
|
2025-12-09 13:32:01 -05:00 | | | }
|
| | | //+------------------------------------------------------------------+
|