Warrior_EA/System/NewBar.mqh

18 lines
696 B
MQL5
Raw Permalink Normal View History

2025-05-30 16:35:54 +02:00
//+------------------------------------------------------------------+
//| NewBar.mqh |
//| AnimateDread |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "AnimateDread"
#property link "https://www.mql5.com"
bool NewBar()
{
datetime cTime[];
ArraySetAsSeries(cTime, true);
CopyTime(Symbol(), Period(), 0, 1, cTime);
static datetime LastTime = 0;
bool ret = cTime[0] > LastTime && LastTime > 0;
LastTime = cTime[0];
return ret;
}