Author: Copyright 2023, MetaQuotes Ltd.
0 Views
0 Downloads
0 Favorites
TestCCheck
//+------------------------------------------------------------------+
//|                                                   TestCCheck.mq5 |
//|                                  Copyright 2023, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2023, MetaQuotes Ltd."
#property link      "https://www.mql5.com"
#property version   "1.00"
#include <Check.mqh>
CCheck check;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
   
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
   
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
  
   if(check.isNewBar(_Symbol,PERIOD_CURRENT))
      {
      Print("New Bar");
      //main funtion
      }
      
   // Or you can use like this
   if(!check.isNewBar(_Symbol,PERIOD_CURRENT)) return;
   Print("New Bar");
   //main funtion
   
  }
//+------------------------------------------------------------------+

Comments