atomantic

Dollar Cost Average Cost Basis

atomantic Mis à jour   
Shows the cumulative cost-basis for buying a fixed $ quantity of the asset over various plots: 30 days, 60, 90, 120, 180, and 1-6 years

  • when the current price is profitable for the DCA plot, fills red
  • when it will reduce the cost-basis for a DCA investor to buy more, turns green
  • draws heavier support lines for longer term DCA investors
  • intensifies colors to show where larger pools of players stand with DCA profitability

Note: since pinescript doesn't have arrays/collections and you can't plot within a for loop anyway, the code repo contains gen.dcacb.sh, which generates the repetitive pinescript using bash.

Source Code here:
https://github.com/atomantic/pine_scripts


Making Money From My Work?
⚡ Lightning Network Satoshi Tips Accepted tippin.me/@antic

With the advent of Bitcoin Lightning Network, you can tip me as little as 1 satoshi (.00000001 $BTC). 1000 satoshi is about $.05 as of this writing. Any amount is appreciated :)

Don't have Lightning?

Blue Wallet (for iOS and Android)
Eclair Wallet (for Android)
Notes de version:
***Update with Continuous Calculation mode by default***

Shows the cumulative cost-basis for buying a fixed $ quantity of the asset over various plots: 30 days, 60, 90, 120, 180, and 1-6 years

  • when the current price is profitable for the DCA plot, fills red
  • when it will reduce the cost-basis for a DCA investor to buy more, turns green
  • draws heavier support lines for longer term DCA investors
  • intensifies colors to show where larger pools of players stand with DCA profitability
  • uses a continuous calculation mode to create static reports but has a boolean option for a sliding window (updates as time progresses)

Note: since Pinescript doesn't have arrays/collections and you can't plot within a for loop anyway, the code repo contains gen.dcacb.sh, which generates the repetitive Pinescript using bash.

Source Code here:
github.com/atomantic/pine_script...


Making Money From My Work?
⚡ Lightning Network Satoshi Tips Accepted https://tippin.me/@antic

With the advent of Bitcoin Lightning Network, you can tip me as little as 1 satoshi (.00000001 $BTC). 1000 satoshi is about $.05 as of this writing. Any amount is appreciated :)

Don't have Lightning?

Blue Wallet (for iOS and Android)
Eclair Wallet (for Android)
Notes de version:
fixed issue where continuous mode was stopping as soon as it couldn't calculate a quantity (whenever reaching back through the intended start date before the ticker was available on the market). Now it will only calculate having spent and bought shares up to the start of the ticker's availability.

Again, source code in bash :)
Notes de version:
Updated rolling window mode to use interval instead of always rolling on daily candles. Now it looks a the active interval and uses that for all the periods.
Notes de version:
add blog post and update graphic
Notes de version:
remove excess experiment

Script open-source

Dans le véritable esprit de 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 le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?