I created an indicator for use inside a strategy. The indicator is called STOCheck. I have three public vars on it that I would like to read out. I added it to a chart (see attached JPG), and I am printing out the values on the chart to make sure there are no errors. In this case, the values returned are TRUE, TRUE, and 3.
However, in my strategy, at this very point in time, when I call my indicator, it always returns FALSE, FALSE, and 0. There are no errors in the log, and the strategy runs fine. I have other indicators that return values using this same technique, so I know I am not crazy. I have verified every single argument call and they match what is on the chart perfectly. I have recompiled everything numerous times.
The only thing I can think of is that this is a multi-bar strategy. My first (default) bars are at 10 ticks. I am evaluating this indicator on the second set of bars (1 minute) which match the chart. However, I have about 5 other indicators using the same technique which return data just fine.
I can’t figure out for the life of me how to debug this other than printing to the Output window from the strategy. I have been working on this for a while and I finally give up. What could be going on here? I am obviously missing something.
Thanks!
Michael

Comment