Nice Coding. I know this comment may seem to contradict everything one can find online (as well as in most charting packages which implement a version of his method)... but to get the correct bar colors for Jim Bergs method as seen in his own charting package "JB Premium Charts" the default values for len1 and len2 should be 21. This new default value rarely effects the entry points, but it does in about 1% of cases.