Use balance in Tradingview script

Hey, is it possible to utilize the balance obtained through the “balance USDT” command in my script to calculate a new position size? I would like to dynamically adjust my position size based on the available balance.

Hello @gigi
No, it is not, but you can use the Q as a percentage instead.


Thanks for the message. ohh that means Q=1% means the distance from SL to entry will use 1% offf my account balance ?

No, Q=1% means that the quantity will be worth 1% of your balance. In this case, note that Q=1% must be greater than the minimum required trading volume in the platform.

SL=1% is when the stop loss is placed 1% away from the entry price.