antondmt

Simple/Compounded Returns & Drawdowns Table

Very excited to bring this script to the public. This is a very useful table that displays the performance of any strategy you give it in a more detailed view. It runs on all timeframes and at any position on the chart with the replay function. It also updates on tick changes. The table consists of three modes: Simple Equity, Compound Equity and Drawdown.

Simple Equity – shows the change in equity for every month and year. It is calculated by finding the difference in initial equity at the beginning of the month/year and the end of the month/year. The table will thus display strategy performance in blocks of time that are not correlated. It is an excellent way to see individual month/year performance from start to finish but it may not represent true change in equity over time. For example, let's assume that 100% of equity is used on every trade for simplicity. If a loss of 50% is made in the first month and a profit of 100% is made in the next month, the strategy will show 50% profit for the year. This aggregate value might be helpful to know for testing purposes, but in reality, the account is actually at break-even for the year (Initial Equity * 0.5 * 2 = Initial Equity).

Compound Equity – shows compounded change in equity for every month and year. It is calculated by finding the difference in starting equity when the strategy is run and equity at the end of the month/year. The table will thus display the true strategy performance – compounded equity at the end of each month/year.

Drawdown – shows max drawdown for every month and year. It is calculated by finding the difference between the highest equity achieved for the month/year and the trough in equity for the same month/year. Notice: strategy tester might have a max drawdown value higher than any of the drawdown values in the table. This is because the strategy tester calculates the difference between the highest and lowest equity for the entire strategy, whereas the table displays drawdowns for months and years only. Sometimes, the max drawdown for the year will also be the max drawdown for the entire strategy; hence the two values will be the same.

To use this table with your own strategy, simply find "PLACE YOUR STRATEGY CODE HERE" at the bottom of the script and place your strategy code there. Special thanks to QuantNomad for the inspiration. As always, please let me know if there are any bugs or if you need some help. Leave a like if you wish!

오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?