I am in the process of creating various types of indicators. Right now I am having difficulties understanding why some values are not evaluating as they should in Lua. Attatched is a simple code that has a loop looking for the lowest low over X periods.
This value is then assigned to a stream. Which I name intI[period]. Below I am trying to simply evaluate if the value in the stream is > or < certain values. The test that is saved is if the value == 5 then intIV[period] = intI[period].
My thought is that if the value in intI[period] is 5 than I should filter out all other stream values from intI[period]. When you run this script you will see it's not true though. It outputs values for 6 and 5. I can't wrap my head around why this is the case. There has to be something fundamental that I am missing about the language.
Please add some clarity for me.