backslash-f

Profit Percentage Tracker

This script provides a quick and easy way to visualize profits in a chart, based on the given entry date and price.
Optionally, alerts can be sent when profits cross up the given "profit unit".

In short:
  • Tracks how much profit one could take based on the input "entry date" and the input "entry price"
  • These inputs are interactive (https://www.tradingview.com/blog/en/pine...)
  • Displays the result in a label on top of the last candle
  • (Optional) Sends alerts based on the given "profit unit", that is: if '0.5' is given, then an alert is triggered every time the profit is raised by that number
    (Be careful with low values, as TradingView could stop an alert if it triggers too much.)

For alerts to be displayed, a "script alert" must be created right after the script was added to the chart:
- https://www.tradingview.com/support/solu...
(Choose 'Profits' as condition and 'Any alert() function call')

Good to know: if you check "Notify on app", alerts can be delivered directly to your phone:
https://i.imgur.com/CH71E9C.jpg

Prerequirements:
The chart's timezone has to be set to "Exchange" (this is required in order to support the alert's logic):
- https://kodify.net/tradingview/platform/...
릴리즈 노트: Refactoring and the introduction of two input variables:
  • alertPrefix: Add a custom prefix to the first line of the alert to indicate whatever you like. E.g.: "". (A trailing white space will be added automatically.)
  • shoudDebugInfo: Check this box to see the values of the main variables on the chart, below bars. This is for debugging purposes only.

Also notice that the input variable "shouldSendAlerts" was removed; alerts are sent if there is a TradingView alert created / configured beforehand... and the opposite is also true. So the variable wasn't really necessary.
릴리즈 노트: Fixes a typo.
릴리즈 노트: Adds a "targetSymbol". That's the symbol for which the indicator is being configured.

This allows for switching to other symbols in the same tab without showing wrong profit data.

If you would like to add multiple profit indicators for different symbols, just insert another profit indicator that targets the new symbol.

Notice: the entry must match the chart's symbol exactly. That is, for example: "BTCUSDT" (instead of just "BTC").
릴리즈 노트: In this update, the following new features were added:

  • Both long and short positions are now supported
  • Helper lines can be now displayed / hidden, such as:
  • Target percentage lines
  • Entry, target, stop and liquidation lines
  • For developers:
  • The script can format the body of the alert as JSON, so one could send it to a server and automate the trading

Happy trading!
릴리즈 노트: (Just updated the chart image.)
릴리즈 노트:
  • Show negative percentage on the STOP and LIQ line labels.
릴리즈 노트:
  • Fix an issue where labels/lines would be added on top of each other under certain conditions.
릴리즈 노트:
  • The target percentage lines now also show the value in parenthesis. E.g. "1.5% (41716.5)"
  • Add the position "size" to the webhook payload (good for some exchanges like FTX)
  • Remove some pesky leading spaces
  • Add some code documentation
  • Refactor / reorganization
릴리즈 노트:
  • Fix the price format on the added lines.
릴리즈 노트:
  • Initialize the metadata array before the actual script; this fixes an issue where the profit label would not show.
릴리즈 노트:
  • Update the chart image
릴리즈 노트:
  • Add Kucoin's Alice to the metadata list.
릴리즈 노트:
  • "Currency profit" (e.g. "275.29 USDT") can now be displayed just below the profit percentage label
  • "Currency profit" is enabled by default. In order for it to be properly calculated, remember to fill in the "size" field
  • The metadata for "FTMUSDT" (Kucoin) was added
릴리즈 노트:
  • Fix entry / current price label formatting
  • Add code documentation
릴리즈 노트:
  • Add FTX's BTC, ETC and LUNA metadata (perp)
릴리즈 노트:
  • Fix an error where the alert would be stopped by TradingView in a very specific scenario where metadata would not be available for the current exchange.
릴리즈 노트:
  • Add metadata information into the debug label; in case a metadata value is empty, a ⚠️ will be displayed for that value.
릴리즈 노트:
  • Add "offset" and "stop limit" information to the debugging label.
릴리즈 노트:
  • Displays the current and metadata exchange information in the debugging label.
  • Displays a warning in case the exchanges don't match.
릴리즈 노트: Only payload changes:
  • The payload now includes raw numbers instead of formatted ones (#.##)
  • DYDX metadata was added (Kucoin)
  • Fix typo in the debug label
릴리즈 노트:
  • Add APE metadata (Kucoin).
릴리즈 노트:
  • Add two more decimals for the prices displayed on the labels (#.## becomes #.####).
  • Add WAVES metadata (Kucoin).
  • Add IOST metadata (Kucoin).
릴리즈 노트:
  • Add the "next stop-limit" line (hidden by default); it shows where the next stop-limit would be, based on the "offset" field
  • Add ATOM metadata (Kucoin)
  • Add ZIL metadata (Kucoin)
릴리즈 노트:
  • Refactor around the debugging label for better clarity
  • Add LUNA metadata (Kucoin)
  • Add RUNE metadata (Kucoin)
  • Add SAND metadata (Kucoin)
릴리즈 노트:
  • Fix a visibility issue of the "next stop limit" line
릴리즈 노트:
  • In addition to the next stop-limit line, the script can now also display the current stop-limit line
릴리즈 노트:
  • Add LINK metadata (Kucoin)
릴리즈 노트:
  • Add SHIBA metadata (Kucoin)
  • Updated some decimal labels to display very low numbers (like SHIBA ones) correctly (i.e. "#.####" to "#.########")
릴리즈 노트:
  • Add FIDA metadata (FTX)
  • Add XRP metadata (Kucoin)
릴리즈 노트:
  • Add NEAR metadata (Kucoin).
릴리즈 노트:
  • Add NEAR metadata (FTX)
  • Add AAVE metadata (Kucoin)
릴리즈 노트:
  • Add ZRX metadata (FTX)
릴리즈 노트:
  • Add APE metadata (FTX)
  • Add WAVES metadata (FTX)
릴리즈 노트:
  • Add GMT metadata (Kucoin)
  • Add TRX metadata (Kucoin)
릴리즈 노트:
  • Add the profitPercentageTrigger that fine tunes server-side execution.
릴리즈 노트:
  • Add the profit percentage trigger line
  • Enhancements around next stop-limit lines
  • Refactoring
릴리즈 노트:
  • Fix issue of the percentage trigger line being plotted multiple times
릴리즈 노트:
  • Adds support for adding Kucoin API's key, secret and passphrase into the JSON payload
릴리즈 노트:
  • Fix formatting issues
릴리즈 노트:
  • Add current stop limit string into the debug view
릴리즈 노트:
  • Add the profit percentage trigger into the alert logic
릴리즈 노트:
  • Add trigger alert String in the debug view
릴리즈 노트:
  • Enhancements & clean up
릴리즈 노트:
  • Fix alert logic
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?