Gordon![]() Member Posts: 22 Joined: 4/9/2008 Location: Fort Washington, PA ![]() | Hi Jim, Thanks again. I should have taken a closer look. Even though you declare simple types, they're still treated like arrays. IN this indicator, nCount is a "single", but you can reference it's previous values. So this should be very doable! I'll post the results of what I code. Dim nCount As Single If C <= C[1] Then ' If we close below yesterday's bar nCount = nCount[1] + 1 ' Then use the count of yesterday, and increment it by one Else nCount = 0 ' Otherwise reset it to zero End If Plot("Count", nCount) ' Create a full plot Return nCount ' Return the calculated value, so it can be used in a filter block |