I am having issues with indexing streams properly. The code I attached has a simple loop and I have a counter in it. I use this counter to make sure that there is a low over X periods of time.
This counter I attach to an internal stream. The problem I am having is indexing this stream and it's values to get the proper outcome.
For simplicity, I was troubleshooting the code to 1 or 0.
Going through the code, I attached output intIII[period] with intI[period] (intI being an internal stream). Then I use intIV[period] and set it to 1 if the output of intIII[period] == 0. Essentially it's supposed to invert the indicator.
What I end up getting is all ones regardless of the intIII[period] value. This is making absolutely no sense to me at all.
Can some one please take a look at this and explain to me what I am missing?
regards,
Gabriel