OPEN-SOURCE SCRIPT
Updated

Optimal Weighted Moving Average

7564
The Optimal Weighted Moving Average was created by Thomas Hutchinson and Peter G. Zhang, Ph.D. (Stocks & Commodities V. 11:12 (500-505)) and it is very similar to a classic weighted moving average but it uses the correlation between the input and the optimal weighted moving average output to use as the weights. Buy when the line turns green and sell when it turns red.

Let me know if you would like to see me publish any other scripts or if you want something custom done!
Release Notes
updated to make it consistent with my other indicators
Release Notes
fixed issue with default resolution

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.