DinGrogu

Statistics Table

Strategy Statistics
This library will add a table with statistics from your strategy. With this library, you won't have to switch to your strategy tester tab to view your results and positions.

Usage:
You can choose whether to set the table by input fields by adding the below code to your strategy or replace the parameters with the ones you would like to use manually.

// Statistics table options.
statistics_table_enabled = input.string(title='Show a table with statistics', defval='YES', options=['YES', 'NO'], group='STATISTICS')
statistics_table_position = input.string(title='Position', defval='RIGHT', options=['LEFT', 'RIGHT'], group='STATISTICS')
statistics_table_margin = input.int(title='Table Margin', defval=10, minval=0, maxval=100, step=1, group='STATISTICS')
statistics_table_transparency = input.int(title='Cell Transparency', defval=20, minval=1, maxval=100, step=1, group='STATISTICS')
statistics_table_text_color = input.color(title='Text Color', defval=color.new(color.white, 0), group='STATISTICS')
statistics_table_title_cell_color = input.color(title='Title Cell Color', defval=color.new(color.gray, 80), group='STATISTICS')
statistics_table_cell_color = input.color(title='Cell Color', defval=color.new(color.purple, 0), group='STATISTICS')

// Statistics table init.
statistics.table(strategy.initial_capital, close, statistics_table_enabled, statistics_table_position, statistics_table_margin, statistics_table_transparency, statistics_table_text_color, statistics_table_title_cell_color, statistics_table_cell_color)

Sample:
If you are interested in the strategy used for this statistics table, you can browse the strategies on my profile.
Perpustakaan pine

Dalam semangat TradingView yang sesungguhnya, penulis telah membuat Pine Code sebagai perpustakaan sumber-terbuka sehingga programmer Pine lainnya dapat menggunakannya kembali. Beri semangat kepada penulis! Anda dapat menggunakan perpustakaan ini secara pribadi maupun dalam publikasi terbuka, namun menggunakan ulang kode ini diatur dalam Tata Tertib.

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.

Ingin menggunakan perpustakaan ini?

Copy garis berikut ini dan tempel pada script anda.