OPEN-SOURCE SCRIPT

PnL Crypto with USD to IDR Conversion

已更新

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.
版本注释
change color
版本注释
set number
版本注释
LIVE PNL
Bands and ChannelsBill Williams IndicatorsBreadth IndicatorsPNL

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?

免责声明