Here is a comparison of Better Sinewave (top) and the Sinewave Tradestation code (bottom) posted on last page. They are not really the same, but I noticed it depends on the interval. On 1500 tick bar Better Sinewave turns faster, but on weekly data ...