Author: Copyright 2021, MetaQuotes Software Corp.
1 Views
0 Downloads
0 Favorites
testonbar
//+------------------------------------------------------------------+
//|                                                    testonbar.mq5 |
//|                        Copyright 2021, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2021, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"

#include <BarEvent.mqh>

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
   BarEventClear();
   BarEventSubscribe(_Period);
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
   
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
   BarEventPusher();
  }
//+------------------------------------------------------------------+

void OnBar(ENUM_TIMEFRAMES tf,datetime time,int shift=0)
  { 
  //
  }

Comments