I'm going nutzo trying to figure out why this simple code does not do what I want it to do.
This is similar to several other codes on the bulletin board that count the number of times you have successive higher lows in place -- with one exception... The number of higher lows needs to be user-selectable.
Here's my code. My idea is to use a global variable that is a running tally of the number of successive higher lows. When that is above a user-selectable threshold, an alert is posted.
Seems simple enough, and a good use of global Variable should do, and this would not be CPU intensive as it it is simple incrementing, rather than using arrays or successive lookbacks.
Any suggestions as to why this does not work as anticipated would be greatly appreciated.
This is similar to several other codes on the bulletin board that count the number of times you have successive higher lows in place -- with one exception... The number of higher lows needs to be user-selectable.
Here's my code. My idea is to use a global variable that is a running tally of the number of successive higher lows. When that is above a user-selectable threshold, an alert is posted.
Seems simple enough, and a good use of global Variable should do, and this would not be CPU intensive as it it is simple incrementing, rather than using arrays or successive lookbacks.
Any suggestions as to why this does not work as anticipated would be greatly appreciated.
Comment