backslash-f

Profit Percentage Tracker

backslash-f アップデート済   
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 (www.tradingview.com/...ow-interactive-27147)
  • 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:
- www.tradingview.com/...97494-script-alerts/
(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:
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):
- kodify.net/tradingvi...m/exchange-time-zone
リリースノート:
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
リリースノート:
  • Add flag to indicate Kucoin spot orders
リリースノート:
  • Add LUNC metadata (Kucoin)
  • Fix number formatting
リリースノート:
  • Add a custom percentage line to quickly check the entry price value based on the inserted percentage.
  • Reformatted the JSON with most relevant information at the top (good for the Apple Watch heehee)
  • Fix lines percentage formatting
リリースノート:
  • JSON formatting
リリースノート:
  • Add LUNC metadata (FTX)
  • Add current price into JSON payload
リリースノート:
  • Lines refactoring, documentation
  • Remove FTX related info
  • Add Kucoin's futures LTC
リリースノート:
  • Add Binance's LUNCUSDT pair
リリースノート:
  • Add Kucoin WAVES futures contract
  • Fix profit percentage in server's payload
リリースノート:
  • New Kucoin future contracts: AVAX, GALA
リリースノート:
  • Add FTM (Kucoin Future)
  • Add GMT (Kucoin Future)
  • Refactor around the custom percentage line
リリースノート:
  • Add new Kucoin future contracts: APT, LDO, MANA, OCEAN, ONE and XMR
リリースノート:
  • Add Kucoin SOL Futures contract
  • Remove Kucoin auth fields
リリースノート:
  • Add new Kucoin Futures contracts: ADA, GAS, NEAR, STORJ
リリースノート:
  • Minor input reordering.
オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?