Stablecoin Supply Ratio Oscillator
The Stablecoin Supply Ratio Oscillator (SSRO) is a cryptocurrency indicator designed for mean reversion analysis and sentiment assessment. It calculates the ratio of CRYPTO:BTCUSD 's market capitalization to the sum of stablecoins' market capitalization and z-scores the result, offering insights into market sentiment and potential turning points.
Methodology:
The SSRO is calculated as follows-
method ssro(float src, array stblsrc, int len) =>
float ssr = src / stblsrc.sum() // Source of the underlying divided by the sum of stablecoin sources
(ssr - ta.sma(ssr, len)) / ta.stdev(ssr, len) // Z-Score Transformed
This ratio is Z-Scored to provide a standardized measure, allowing users to identify periods of market fear or greed based on the allocation of capital between the underlying and Stablecoins ( CRYPTOCAP:USDT , CRYPTOCAP:USDC , CRYPTO:TUSD , CRYPTOCAP:BUSD , CRYPTOCAP:DAI , CRYPTOCAP:USDD , CRYPTOCAP:FRAX ). The z-scored values indicate potential areas of discount (buying opportunities) or premium (selling opportunities) relative to historical patterns.
Customization:
Underlying Asset: SSRO is customizable to different underlying assets, offering a versatile tool for various cryptocurrencies.
Calculation Length: Users can adjust the length of the calculation, tailoring the indicator to short or long-term analysis.
Visualization: SSRO can be displayed as candles, providing a visual representation of premium and discount areas.
Interpretation:
Market Sentiment: Lower SSRO values may indicate market fear, suggesting a preference for stablecoins as a relatively safer haven for capital. Conversely, higher values may suggest market greed, as more capital is allocated to the underlying asset.
Utility and Use Cases:
1. Mean Reversion Analysis: SSRO identifies potential mean reversion opportunities, guiding traders on optimal entry and exit points.
2. Sentiment Analysis: The indicator provides insights into market sentiment, aiding traders in understanding market dynamics.
3. Macro Analysis: The majority of cryptos follow \ correlate to CRYPTO:BTCUSD , Therefore by assessing premium and discount areas of CRYPTO:BTCUSD relative to the chosen underlying asset, users gain insights into potential market tops and bottoms.
4. Divergence Analysis: SSRO divergence from price trends can signal potential reversals, providing traders with additional confirmation for their decisions.
The Stablecoin Supply Ratio Oscillator is a valuable tool for cryptocurrency traders, offering a nuanced perspective on market sentiment and mean reversion opportunities. Its customization options and visual representation make it a versatile and powerful addition to the crypto analyst's toolkit.
Dollarcostaverage
DCA Simulator A simple yet powerful Dollar Cost Averaging (DCA) simulator.
You just add the script to your chart, and you'll be able to see:
- Every single entry with its size
- The evolution of you average price in time (blue line)
- The profit and loss areas (where market price < average price the DCA is at loss, and the background is colored in red. At the contrary, where mkt price is > average price, it's profit area and the background is green).
- Max drawdown: the point in price and time where the DCA loss is maximum in the considered time interval. The drawdown amount is specified.
- Profit (or loss) and total cost at the end of the time interval or at the present day: the script shows how much the DCA is netting at a profit or loss, as well as the total cost of the DCA itself.
The parameters are:
- Date start and date end: time interval of the DCA simulation
- DCA period (you can choose between daily, weekly and monthly)
- Week day or month day if you choose those periods
- Single operation size (in base currency)
- Option to choose a DCA LONG or DCA SHORT (for uber bears)
- Option to include an exit strategy that partially closes your position (the % size closed can be chosen as well with the parameter "exit_close_perc") every time the DCA realizes a specific gain (choosable with the parameter "exit_gain_threshold"). If you choose "none" as an exit strategy, the script will assume to never close positions until the end of the period or the present day for simulation purpose.
NB: just ignore the TV strategy tester results, all the data are visible on the chart.
Dollar Cost Averaging (Portfolio)
You can use it in daily, weekly and monthly candles. It can be used on multiple assets(10). All assets must have data and make sure they all use the same currency. See style in settings for plot titles If you are interested in passive investing, I hope it helps.
------------------
Günlük, haftalık, aylık mumlarda kullabilirsiniz. Birden fazla varlıkta kullanılabilir. Çoklu kullanım için hepsinin verisi olmalı ve aynı para birimini kullanmalı. Ayarlardan stilde grafik başlıklarını bulabilirsiniz. Pasif yatırım ile ilgiyseniz umarım yardımcı olur.
Crypto Force IndexIntroduction
The Crypto Force Index (CFI) indicator helps us understand the current strength and weakness of the price. It is very useful when used on high timeframes for investment purposes and not for short term trading.
To determine the strength and weakness of the price, a level grid based on the RSI indicator is used.
Based on the RSI value, red circles (oversold condition) and green circles (overbought condition) appear under the price candles. The more intense the color of the circles, the more that the current price is in an overbought or oversold condition.
The signal levels are all configurable to adapt the indicator across multiple instruments and markets.
The default configuration have been designed to obtain more accurate signals on Ethereum and Bitcoin, using the weekly timeframe.
Why Crypto Force Index?
The Crypto Force Index (CFI) is the consequence of my study of investments based on the accumulation plan. I wanted to demonstrate that I am improving the returns of the classic DCA ( dollar cost averaging ) and VA ( value averaging ).
After finding my own model of an accumulation plan, I decided to create the Crypto Force Index to help me visually enter the market.
The formulas of the indicator are very simple, but my studies confirm the power of this tool.
How are the signals to be interpreted?
The Crypto Force Index helps us to highlight the overbought and oversold areas, with the use of circles under the price of candles and with a thermometer inserted at the base of the graph, where all the phases of strength and weakness are highlighted.
As soon as the red circles start to appear on the chart, that may be a good time to enter LONG to the market and start accumulating. If the circles are green, we can consider decreasing the current exposure by selling part of your portfolio, or decide to stay flat.
I personally use these signals on the weekly timeframe, to decide to feed my accumulation plan at the beginning of each month.
I hope it can be of help to you! Please help me improve the Crypto Force Index! :)
Krugman's Dynamic DCAThis script helps you create a DCA (dollar-cost averaging) strategy for your favorite markets and calculates the DCA value for each bar. This can be used to DCA daily, weekly, bi-weekly, etc.
Configuring the indicator:
- DCA Starting Price : the price you want to begin DCA'ing
- DCA Base Amount : the $ amount you will DCA when price is half of your starting price
- DCA Max Amount : the maximum amount you want to DCA regardless of how low price gets
The DCA scaling works exactly like the formula used to calculated the gain needed to recover from a given % loss. In this case it's calculated from the DCA Starting Price . The idea is to increase the DCA amount linearly with the increased upside potential.
Period Dollar Cost Average BacktesterHere is a simple script to calculate the profits and other dollar cost average strategy statistics. This strategy was created to avoid asset price volatility, so the pump and dump scheme does not affect the portfolio. By dividing the investment amount into periods, the investor doesn’t need to analyze the market, fundamental analysis, or anything. The goal is to increase the asset holdings and avoid fast and robust price movements.
This indicator has some configurations.
Amount to buy: the amount to buy at each time
Broker fee %: the fee percentage that the broker has for spot trade
Frequency: the frequency of the investments. Example: 1 Day means that every day, it will buy an amount of the asset
Starting Date: when the indicator will start the investment simulation
Ending Date: when the indicator will end the investment simulation
InfoCell With/Height: it relates to the panel for view purposes. Change the values to fit better on your screen.
This indicator has three lines:
Total Invested (green): total amount invested at the end of the period
Total Net Profit (pink): total profit by converting the amount of the asset bought at the latest closing price
Holding Profits (yellow): the amount that would be in the portfolio if the investor had invested all the capital in a signal trade at the beginning of the period.
The statistics panel has some information to help you understand buying the asset in one or more trades. So, besides those three lines that were mentioned above, here are the other statistics:
Entry Price: The price of the asset when the first investment was made
Gross Profit: Total amount of profit, not excluding the losses
Gross Losses: Total amount of losses, not excluding the profits
Profit Factor: The Gross Profit divided by the Gross Loss. A value above 1 means it’s profitable.
Profit/Trades: Net profit per trade. This includes the broker fees.
Recovery Factor: The Net profit divided by the relative drawdown. The higher the recovery factor, the faster the recovery of a loss
Total Asset Bought: The amount of the asset that was bought at the end of the investment plan
Absolute Drawdown: The total amount of losses that made the account balance go below its initial value
Relative Drawdown: The max drawdown that occurred, no matter the account balance amount
Total Trades: number of times the investment was made in the selected period
Total Fee: total Fee that was spent on the total investment
Total Winning Trades: the total amount of winning trades. A trade is considered a winner if the net profit is up compared with the latest investment.
Total Losing Trades: the total amount of losing trades. A trade is considered a loser if the net profit is down compared to the latest investment.
Max consecutive wins: the max amount of consecutive winning trades
Max consecutive losses: the max amount of consecutive losing trades
The chart above uses the default configuration of the indicator. Placed on the BTCUSD market, taking the time range of January 1st, 2018 to January 1st, 2022, 4 years. Buying a BTC amount with 10 USDT every day in that period would generate a more than 500% profit. Compared to the profit amount by just holding the count, which was close to 350% profit, the dollar cost average by period would be much more profitable.
Dollar cost averaging This is a testing startergy based on dollar cost averaging and sell on high points.
RebalancingThis script gives you an approximation of the APR you can get when using the technique of Rebalancing.
Further discription are embeded in the script.
HOW TO USE:
- Start date: Choose start date
- Settings: Change settings to your own needs
- Base currency: Select Base currency
- Portfolio: Select the coins (MAX 9 pcs.) you want to use in your portfolio for the rebalancing algoritm
- Click "Data Window" to see the APR (appr.)
Markets:
It can be used to all markets.
NOTE:
Some Exchanges don't go very far back in the past and for this reason this may have impact on this Indicator.
Make sure the coins you selected are available at the Exchange you select in the settings section. If you dont do this, the script generates an error.
Backtesting 3commas DCA Bot v2Updating previously published simulated 3commas DCA logic with a sexier insert and more meaningful default parameters.
(IK) Base Break BuyThis strategy first calculates areas of support (bases), and then enters trades if that support is broken. The idea is to profit off of retracement. Dollar-cost-averaging safety orders are key here. This strategy takes into account a .1% commission, and tests are done with an initial capital of 100.00 USD. This only goes long.
The strategy is highly customizable. I've set the default values to suit ETH/USD 15m. If you're trading this on another ticker or timeframe, make sure to play around with the settings. There is an explanation of each input in the script comments. I found this to be profitable across most 'common sense' values for settings, but tweaking led to some pretty promising results. I leaned more towards high risk/high trade volume.
Always remember though: historical performance is no guarantee of future behavior . Keep settings within your personal risk tolerance, even if it promises better profit. Anyone can write a 100% profitable script if they assume price always eventually goes up.
Check the script comments for more details, but, briefly, you can customize:
-How many bases to keep track of at once
-How those bases are calculated
-What defines a 'base break'
-Order amounts
-Safety order count
-Stop loss
Here's the basic algorithm:
-Identify support.
--Have previous candles found bottoms in the same area of the current candle bottom?
--Is this support unique enough from other areas of support?
-Determine if support is broken.
--Has the price crossed under support quickly and with certainty?
-Enter trade with a percentage of initial capital.
-Execute safety orders if price continues to drop.
-Exit trade at profit target or stop loss.
Take profit is dynamic and calculated on order entry. The bigger the 'break', the higher your take profit percentage. This target percentage is based on average position size, so as safety orders are filled, and average position size comes down, the target profit becomes easier to reach.
Stop loss can be calculated one of two ways, either a static level based on initial entry, or a dynamic level based on average position size. If you use the latter (default), be aware, your real losses will be greater than your stated stop loss percentage . For example:
-stop loss = 15%, capital = 100.00, safety order threshold = 10%
-you buy $50 worth of shares at $1 - price average is $1
-you safety $25 worth of shares at $0.9 - price average is $0.966
-you safety $25 worth of shares at $0.8. - price average is $0.925
-you get stopped out at 0.925 * (1-.15) = $0.78625, and you're left with $78.62.
This is a realized loss of ~21.4% with a stop loss set to 15%. The larger your safety order threshold, the larger your real loss in comparison to your stop loss percentage, and vice versa.
Indicator plots show the calculated bases in white. The closest base below price is yellow. If that base is broken, it turns purple. Once a trade is entered, profit target is shown in silver and stop loss in red.
Bitcoin Difficult Model [ChuckBanger]Simple script that graphically represents the mining difficulty of Bitcoin. It is ment to be used as a tool to decide when it is good time to dollar cost average (DCA) in your Bitcoin hodl position. When Price is below the difficulty model it is usually a good time to DCA.
Formula for the model used in this calculation is 0.002 * difficulty ^ 0.51. It is possible to change this numbers if necessarily.
msoro daily DCATool to estimate PnL of your investment if you put in a fixed $ amount daily into btc for past year. It takes input as 365 days which can be changed as per need.
BEST Dollar Cost AverageHello traders
This is an upgraded version of my Dollar Cost Average (Data Window) script
1 - What is Dollar-Cost Averaging ( DCA )?
Dollar-Cost Averaging is a strategy that allows an investor to buy the same dollar amount of investment at regular intervals. The purchases occur regardless of the asset's price.
I hope you're hungry because that one is a biggie and gave me a few headaches. Happy that it's getting out of my way finally and I can offer it
🔸 This indicator will analyze for the defined date range, how a dollar-cost average ( DCA ) method would have performed (green panel) versus investing all the hard earnt money at the beginning (orange panel)
=> green versus orange
2- What's on the menu today?
My indicator works with all asset classes and with the daily/weekly/monthly inputs.
⚠️⚠️⚠️ However, results are only visible on the DAILY timeframe chart
As always, let's review quickly the different fields so that you'll understand how to use it (and I won't get spammed with questions in DM ^^)
🔸 Use current resolution: if checked will use the resolution of the chart
🔸 The timeframe used for DCA: different timeframe to be used if Use current resolution is unchecked
🔸 Amount invested in your local currency: The amount in Fiat money that will be invested at each period selected above
🔸 Starting Date
🔸 Ending Date
🔹 The script screenshot shows a DCA with 100 USD invested daily from 01.01.2017 to 01.28.2020
3- Bonus (DATA WINDOW)
🔸 Please check this screenshot to understand what you're supposed to see: Data window
And a quick video that I did months ago explaining how we can use this data window effectively
4 - Specifications used
I got the idea from this website dcabtc.com and the result shown by this website and my indicator are very interesting in general and for your own trading
The formula used for the DCA calculation is the one from the Investopedia website.
Best regards and best of luck
Dave
Dollar Cost Average IndicatorRisk indicator to determine best time to enter (and exit) position based on EMAs. Both long term (default) and short term available.
Dollar Cost Average (Data Window Edition)Hi everyone
Hope you had a nice weekend and you're all excited for the week to come. At least I am (thanks to a few coffee but that still counts !!!)
This indicator is inspired from Dollar-Cost-Average-Cost-Basis
EDUCATIONAL POST
The educational post is coming a bit later this afternoon explaining how to use the indicator so I would advise to follow me so that you'll get updated in real-time :) (shameless self-advertising)
1 - What is Dollar-Cost Averaging (DCA)?
Dollar-Cost Averaging is a strategy that allows an investor to buy the same dollar amount of an investment on regular intervals. The purchases occur regardless of the asset's price.
I hope you're hungry because that one is a biggie and gave me a few headaches. Happy that it's getting out of my way finally and I can offer it
This indicator will analyse for the defined date range, how a dollar cost average (DCA) method would have performed vs investing all the hard earnt money at the beginning
2- What's on the menu today ?
Please check this screenshot to understand what you're supposed to see : CLICK ME I'M A SCREENSHOT (I'll repeat this URL one more time below as I noticed some don't read the information on my description and then will come pinging me saying "sir me no understand your indicator, itz buggy sir"
(yes I finally thought about a way to share screenshots on TradingView, took me 4 weeks, I'm slow to understand things apparently)
My indicator works with all asset classes and with the daily/weekly/monthly timeframes
As always, let's review quickly the different fields so that you'll understand how to use it (and I won't get spammed with questions in DM ^^)
- Use current resolution : if checked will use the resolution of the chart
- Timeframe used for DCA : different timeframe to be used if Use current resolution is unchecked
- Amount invested in your local currency : The amount in Fiat money that will be invested at each period selected above
- Starting Date
- Ending Date
- Select a candle level for the desired timeframe : If you want to use the open or close of the selected period above. Might make a diffence when the timeframe is weekly or monthly
3 - Specifications used
I got the idea from this website dcabtc.com and the result shown by this website and my indicator are very interesting in general and for your own trading
The formula used for the DCA calculation is that one : Investopedia Dollar Cost Average
4 - How to interpret the results
"But sir which results ??"...... those ones : CLICK ME I'M A SCREENSHOT :) (strike #2 with the screenshot)
It will draw all the plots and will give you some nice data to analyze in the Data Window section of TradingView
I'm not completely satisfied with the tool yet but the results are very closed to the dcabtc website mentioned above
If you're trading a very bullish asset class (who said crypto ?), it's very interesting to see what a DCA strategy could bring in term of performance. But DCA is not magic, there is a time component which is the day/week/month you'll start to invest (those who invested in crypto beginning of 2018 in altcoins know what I'm talking about and ..............will hate me for this joke)
5 - What's next ?
As said, the educational post is coming next but not only.
Will probably post a strategy tomorrow using this indicator so that you can compare what's performing best between your trading and a dollar cost average method
I'll publish as a protected source this time a more advanced version of that one including DCA forecasts
6 - Suggested alternative (but I'll you doing it)
If you don't want to have this panel in the bottom with the plots and analyze the results in the data window, you can always create an infopanel like shown here Risk-Reward-InfoPanel/ and display all the data there
Hope you'll like it, like me, love it, love me, tip me :)
____________________________________________________________
Feel free to hit the thumbs up as it shows me that I'm not doing this for nothing and will motivate to deliver more quality content in the future. (Meaning... a few likes only = no indicators = Dave enjoying the beach)
- I'm an offically approved PineEditor/LUA/MT4 approved mentor on codementor. You can request a coaching with me if you want and I'll teach you how to build kick-ass indicators and strategies
Jump on a 1 to 1 coaching with me
- You can also hire for a custom dev of your indicator/strategy/bot/chrome extension/python
Dollar Cost Average Cost BasisShows 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:
github.com
Making Money From My Work?
⚡ Lightning Network Satoshi Tips Accepted tippin.me
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)
Average DownThis strategy has been published for a Pyramiding tutorial on the Backtest Rookies website.
For a full overview of the code and an introduction to Pyramiding check out our site.
Summary
The code example will create a simple script that allows us to average down whenever our portfolio is down x%. The idea will be to bring our average cost down so that we can still exit with a profit when conditions improve. With this in mind, the strategy shall also have a simple take profit exit at x% above our average price.
Inputs
Target Loss to Average Down (%) : This is the target percentage level will trigger us to average down. In other words, if we have a close below this level from our average buying price, we will average down.
Target Take Profit : A standard take profit percentage level. Use this to set how much profit you will target.
% Of Current Holdings to Buy : Is the number of shares/contracts we will aim to buy when we average down. 50 will mean we buy 50% of our current holdings. So if we have 100 shares, then we buy 50 when we average down.
SMA Period : Defines our SMA lookback period. Our strategy will enter the first/initial position when we have a close above our SMA level.