Relative Performance

millerrh アップデート済   
This indicator takes the Performance Table from @BeeHolder and converts it to a Relative Performance table so you can compare the current chart vs. an Index (or whatever other ticker you want) to see the relative performance of one vs. the other. I also added a cell for ADR, which is also the same value as "Monthly Volatility" in the stock screener. This can be useful when screening stocks based on performance and volatility .
Conversion to Pine v5
Added a box to the table that looks at the distance from the 52 week high. The idea behind this is that the strongest stocks will be close to their highs and that's what you should focus on. I've coded it so that if a stock is within 25% of its 52 week high the color will be green indicating a good candidate.
Changed the calculation for distance from the 52 week high to be the drawdown off the high instead of the percentage required to get back to the high as I think this is what people usually refer to when talking about this metric.


TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。