OPEN-SOURCE SCRIPT

Manage trade

This indicator is intended to simulate a second entry to adjust the average price.

INPUTS:
Current price || Coins -> Current price, your first entry || Initial amount of coins
Simulate entry || Coins -> New entry, from this entry the average price will be calculated || new amount of coins
Simulate partial % || Coins -> Percentage over current price or average price || Amount of coins withdrawn

* Currency conversion
Value $ || Target price -> amount or coins, example: 25 dolar or 25 busd || Acquisition target price, returns desired coin amount, visible in table.

Table information:
simbol = current symbol
current price = First entry price
total coins = Total coins from first entry
profit or loss = self explanatory
update value = increases or decreases according to profit or loss
Partial profit = partial simulation result,
$ ⮕ ₿ = total amount of currencies in the conversion
Pine utilities

Open-source script

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 publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer