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:
But it seems to make no difference.
Should I be using onBarUpdate() or onBarClose when I only want calculations once per bar?
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?