Return & Drawdown

ReDraw script calculates the historical returns and drawdown for the given periods.

By default, the return of the linear regression trends is displayed (can be turned off in settings). In this mode, two linear regression trends are being computed for both long and short periods, and the percent value indicates the "return of the trend" for the corresponding period. Observing the dynamic of the linear regression trends can give a great hint if the trend is slowing down.

When the smoothing method is set to "none" or WMA3/5, the real asset return is shown for both periods, using the formula (LastPrice-FirstPrice)/FirstPrice

The script calculates the maximum drawdown for the long period using the formula (max(Price) - LastPrice) / max(Price).

The white line under the zero is the average maximum drawdown over the long period.

When the mode is set to Compare, ReDraw will display the difference in metrics between the current and selected symbol ( SPY by default).

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。