Study.calculate() - how often is it called given specific bar period?

Shtick Hustler

Well-known member
Joined
Oct 15, 2020
Posts
105
Likes
46
I'm using System.out.println statements to send debugging info to the MW logs.

I notice that my prints are repeating multiple times, with the same timestamp, from calculate(). Am currently using a 200 tick chart of MYM.

Thought this might have to do with multiple charts running the same study, so I removed all but one study and restarted MW--got same result.

I had assumed calculate was called once per bar period. Is this not correct?

I tried wrapping my printlns in:
Java:
if (series.isBarComplete(index)) { ... }

But it seems to make no difference.

Should I be using onBarUpdate() or onBarClose when I only want calculations once per bar?
 

Shtick Hustler

Well-known member
Joined
Oct 15, 2020
Posts
105
Likes
46
Moving this question to another thread as it may be a bug:
 
Top