Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IsNewBar don't work #16

Open
elijunior01 opened this issue Jun 24, 2023 · 1 comment
Open

IsNewBar don't work #16

elijunior01 opened this issue Jun 24, 2023 · 1 comment

Comments

@elijunior01
Copy link

elijunior01 commented Jun 24, 2023

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.

@Denn1Ro
Copy link
Owner

Denn1Ro commented Apr 18, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants