When you want to open a position, just complete the parameters and the script will tell you how much you have to bet in dollars or cryptos units, depending the way you're trading.
Note : don't foreget that you have to pay fees on exchanges whose are not included here, specially with high leverage trades.
Set 2 decimals for the bet in dollars et 3 for the one in cryptos.
To use it, just tick the option in parameters.
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 a publication is governed by House Rules. You can favorite it to use it on a chart.