OPEN-SOURCE SCRIPT

PnL Crypto with USD to IDR Conversion

Mis à jour

How to Use the Indicator
  1. Input Your Average Buy Price and Position Size:

  • In the indicator settings, input your average buy price (the price at which you entered the position) and your position size (the amount of crypto you hold).

  • These values are used to calculate your PnL.


  1. View the Average Buy Price Line:

*A dotted horizontal line will be plotted on the chart at your average buy price. This helps you visually compare the current price to your entry point.

*Check the Floating Label:
*On the last bar of the chart, a floating label will display:
[**]USDT PnL: Your profit or loss in USDT.
[**]IDR PnL: Your profit or loss converted to Indonesian Rupiah.
*The label will be colored green for profit and red for loss.

*Understand the Calculations:
*PnL in USDT: (Current Price - Average Buy Price) * Position Size
*PnL in IDR: The USDT PnL is converted to IDR using the real-time USD/IDR exchange rate fetched from the FX_IDC:USDIDR ticker.
Notes de version
change color
Notes de version
set number
Notes de version
LIVE PNL
Bands and ChannelsBill Williams IndicatorsBreadth IndicatorsPNL

Script open-source

Dans le plus pur esprit TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par nos Règles. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Vous voulez utiliser ce script sur un graphique ?

Clause de non-responsabilité