I have scripted an indicator x that uses values of indicator y.
To check if indicator y has valid values I use
indicator_y.IsValidPlot(bars_ago).
Normally this works fine but not this time. Therefore it must have something to do with
the validity check of indicator y itself and the structure of that indicator.
Indicator y works fine if applied to a chart. It calculates 2 plots that are displayed in the chart. Values should be accessable with a command like indicator_y.Plot1 and
indicator_y.Plot2.
If I use indicator_y.IsValidPlot(bars_ago) for checking validity it plots false every time.
It should be true, though.
If I use indicator_y.Plot1.ContainsValue(bars_ago) it gives an error at bar 0
because of usingf an invalid index.
It's the first time I have scripted an indicator that contains 2 dataseries.
Obviously there is some basic logic I need to change.
Although the indicator y itself works fine,
I can't conduct validity checks to use indicator y within other indicators.
How should this be done? Couldn't find any hints in the help file yet.
Thanks in advance!
Stephan
Comment