Changes: 1) Added option to disable long and short positions (checkboxes 'Long' and 'Short'). 2) Added date selection option. 3) The default commission is 0.1% (original 0%). 4) 100% of capital is used by default (5% in the original version).
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publications is governed by House rules. 您可以收藏它以在圖表上使用。