//+------------------------------------------------------------------+ //| BosChoch.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 #include CBarControler bar_controlerd1(PERIOD_D1, _Symbol); CBarControler bar_controler_curr(_Period, _Symbol); CBosChoch bos_choch; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- indicator buffers mapping bos_choch.Create(_Symbol, _Period); bos_choch.SetGrapich(clrBlue, clrBlue, clrRed, clrRed, STYLE_DOT); bos_choch.Init(4, clrBlue, clrRed, "Arial", 7, false, 30, MODE_SWING_NO_STRICT, false, 500); //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- ICTGen_OnDeinitEvent(); } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- const datetime curr_time = TimeCurrent(); const bool new_day = bar_controlerd1.IsNewBar(curr_time); //--- if(bar_controler_curr.IsNewBar(curr_time)) { ICTGen_FuncionOnBar(new_day, curr_time); //Primero siempre ejecutar FUncionOnBar bos_choch.OnNewBarSimple(); ICTGen_FuncionOnEndBar(); //Finlizar con OnEndBar } } //+------------------------------------------------------------------+