TradingView
QuantNomad
Aug 16, 2021 11:33 AM

Monthly Returns in PineScript Strategies 

Bitcoin / TetherUSBinance

Description

I'm not 100% satisfied with the strategy performance output I receive from TradingView. Quite often I want to see something that is not available by default. I usually export raw trades/metrics from TradingView and then do additional analysis manually.
But with tables, you can build additional metrics and tools for your strategies quite easily.

This script will just show a table with monthly/yearly performance of your script. Quite a lot of traders/investors used to look at returns like that. Also, it might help you to identify periods of time when your strategy performed good/bad than expected and try to analyze that better.
The script is very simple and I believe you can easily apply it to your own strategies.

Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.

Release Notes

Fixed bug with new bars updates
Comments
RicardoSantos
thank you for improving pinescript for every one, this would be a nice addition as a library, so it could be used in any strategy :)
pincopallino67
Very elegant coding. Thanks for posting it.
QuantNomad
TopEndTop
@QuantNomad, Please, could you do the same for weekly, so that you can select a year, and display 52 weeks in a similar way? I didn't manage to do it from your example.My indicator requires more detailed consideration of profits for debugging
mtahreemalam
@TopEndTop, +1, a weekly will greatly help in evaluating the consistency of any strategy week over week
QuantNomad
@mtahreemalam, Ok, I will take a look at the weekly version.
mtahreemalam
BreathingAmplitude
Awesome, thank you
Mohamed3nan
Thank you for help
PineCoders
More