MQL_Easy icon indicating copy to clipboard operation
MQL_Easy copied to clipboard

IsNewBar don't work

Open elijunior01 opened this issue 1 year ago • 1 comments

CUtilities utils("EURUSD");
if(utils.IsNewBar(PERIOD_M1)){ Print("One Minute Passed!!!"); }

The function IsNewBar() don't work properly for mql4 MT4 build 1380 x86 Windows 7. Every tick it's said is new bar.

elijunior01 avatar Jun 24 '23 00:06 elijunior01

As we test the functionality, it seems that it works correctly on the latest version of Metatrader 4. I would like to ask where the initialize of object utils("EURUSD") happens? If it is initialized inside the OnTick function, then the message "One Minute Passed!!!" should be printed on every tick because the object is created on every tick. The initialization of the object utils should be inside OnInit function.

Denn1Ro avatar Apr 18 '24 07:04 Denn1Ro