Correlation Coefficient - DXY & XAUPublishing my first indicator on TradingView. Essentially a modification of the Correlation Coefficient indicator, that displays a 2 ticker symbols' correlation coefficient vs, the chart presently loaded.. You can modify the symbols, but the default uses DXY and XAU, which have been displaying strong negative correlation.
As with the built-in CC (Correlation Coefficient) indicator, readings are taken the same way:
Positive Correlation = anything above 0 | stronger as it moves up towards 1 | weaker as it moves back down towards 0
Negative Correlation = anything below 0 | stronger moving down towards -1 | weaker moving back up towards 0
This is primarily created to work with the Bitcoin weekly chart, for comparing DXY and Gold (XAU) price correlations (in advance, when possible). If you change the chart timeframe to something other than weekly, consider playing with the Length input, which is set to 35 by default where I think it best represents correlations with Bitcoin's weekly timeframe for DXY and Gold.
The intention is that you might be able to determine future direction of Bitcoin based on positive or negative correlations of Gold and/or the US Dollar Index. DXY has been making peaks and valleys prior to Bitcoin since after March 2020 black swan event, where it peaked just after instead. In the future, it may flip over again and Bitcoin may hit major highs or lows prior to DXY, again. So, keep an eye on the charts for all 3, as well as the indicator correlations.
Currently, we've moved back into negative correlation between Bitcoin and DXY, and positive correlation with Bitcoin and Gold:
Negative Correlation b/w Bitcoin and DXY - if DXY moves up, Bitcoin likely moves down, or if DXY moves down, Bitcoin likely moves up (or if Bitcoin were to move first before DXY, as it did on March 2020, instead)
Positive Correlation b/w Bitcoin and Gold - Bitcoin and Gold will likely move up or down with each other.
DXY is represented by the green histogram and label, Gold is represented by the yellow histogram and label. Again, you can modify the tickers you want to check against, and you can modify the colors for their histograms / labels.
The inspiration from came from noticing areas of same date or delayed negative correlation between Bitcoin and DXY, here is one of my most recent posts about that:
Please let me know if you have any questions, or would like to see updates to the indicator to make it easier to use or add more useful features to it.
I hope this becomes useful to you in some way. Thank you for your support!
Cheers,
dudebruhwhoa :)
BTC-M
Buy / Sell Fractal Algorithm with SL Line GenerationThis algorithm is designed for usage across indices.
How it works?
The algorithm uses a variation of fractals, momentum, RSI and LRSI to determine a trends direction.
The Relative Strength Index (RSI) is a momentum-based oscillator used to measure the speed (velocity) and change (magnitude) of directional price movements. It provides a visual means to monitor both the current and historical strength and weakness of a particular market. The strength or weakness is based on closing prices over the duration of a specified trading period, creating a reliable metric of price and momentum changes
Momentum in trading refers to the direction and magnitude of price. Momentum plays a key role in assessing trend strength, and it is important to know when a trend is slowing down. Less momentum does not always lead to a reversal, but it does signal that something is changing, and the trend may consolidate or reverse
Fractals are patterns within price changes which are repeated across thousands of bars. Examples of fractals include the golden ratio, PHI and the spirals of the milk way. They are quite literally a universal concept.
Basics of usage:
When a bullish trend is detected; the algorithm will generate a green "SL Line" at a calculated point, which can be interpreted as an invalidation line.
If the price goes below this line, the bullish trend is invalidated. So long as it holds, the bullish trend is true until the next detection change.
When a bearish trend is detected; the algorithm will generate a red "SL Line", at a calculated point, which can be interpreted as an invalidation line.
If the prices goes above this line, the bearish trend is invalidated. So long as it holds, the bearish trend is true until the next detection change.
When a given trend is invalidated, the SL Line turns yellow and you enter a "pause zone", where neither a bearish nor bullish trend is calculated.
This resets itself on the next trend detection.
Additional information:
I have coded my own backtest to this algorithm, along with plotting the profit / loss of each generated trade.
The profit is calculated by the difference between the open bar of the trade after a long ( or short ) and the following trade.
If we are calculating a short, the resulting value is then multiplied by -1 to get a positive integer.
For calculating a loss we take the value of the open bar of the trade that generates a long, and take the difference between this and the SL line, and similarly for short positions. The code assumes the user is placing their SL at the indicated line.
Within the input settings there are a few customisation options:
Alpha & Fractal Energy Length & Source - Should not be changed.
Highly bands crossover? - Has no visible effect whether on or off. It refers to the fractal chart which in this iteration is not visible and rather a backend mechanic.
Apply fractal energy? - Should generally be left turned on. This is a noise reduction. Disabling will result in over-trading.
Apply normalization? - Has no impact, is solely used to make the fractal values more human-readable rather than decimal format.
Offset - refers to the offset value of the SL Line generations. This should be set to a value that gives you enough breathing room, and remember to include any spreads! Default is 0.2, written in %
Trading hours - This simply gives a session input for the trading hours you want to trade within, and then colours the background green for that session. Trading 24/7 is never a wise strategy, stick to whatever is most optimal for you.
Leverage - Whatever leverage you are using. Default is x20. This will affect the profit / loss calculations accordingly.
Start equity - refers to the equity value you want to backtest with. Some assets will generate NA for this in the backtest label explained later.
Label customisation options.
Note that the backtest label is by default hidden, and appears when you hover over the black label at the current bar. When enabled to visible, it will show a large text label that may cover your chart screen more than you wish.
Alerts -
There are dozens of alert functionalities here; first are the timeframe assignments for each alert, set by default to 2hrs.
These timeframes then affect the asset you select in the corresponding setting.
In total there are 8 additional assets you can set alerts for.
Once you have assigned the timeframe and asset for an alert, you can then check the tick box for that individual alert.
Once done, you set the alert as normal through the tradingview alerts window. Remember to set "alert function calls only"
-
Timers:
I have added some functionality for timers to be set, values are in minutes. These work on the exact time of placement. Do not change the extra symbol formula option.
-
Note that this backtest is not intended as a replacement for tradingview backtest, nor is there a guarantee that historical results are to be replicated in the future. Trading is inherently risky.
Correlation prix [SP500, TESLA, BTCBefore you see this post I want to thank all the TradingView team. Every day that passes I learn better and better to use Pine script and I owe this to all those who publish and to the philosophy of TradingView. Thanks from Amos
This trading indicator compares the prices of the S&P 500 Index (SP500), Tesla (TSLA), and Bitcoin (BTC) to find correlations between them. To make the prices of SP500 and Tesla comparable to the price of Bitcoin, the indicator multiplies the closing price of Tesla by 114 and the closing price of the S&P 500 Index by 5.6.
In this way we can superimpose the prices on the BTC chart and see what happens.
Average BTC price/ tesla price = 114, so if we multiply the tesla price by 114 times we can superimpose it on the BTC price
At average BTC/SPX price = 5.6, also in this case we multiply the price of SPX by 5.6 to overlay the graph and see any correlations.
The indicator then calculates the average price between SP500 and Tesla, using the formula (SP500 + Tesla) / 2. This calculation creates a new line on the chart that represents the average price between these two assets.
The BTC_SP_TE variable is then calculated as the average of the closing price of Bitcoin and the previously calculated average price of SP500 and Tesla, using the formula (Btc + SP_TE) / 2. This calculation creates another line on the chart that represents the average price between Bitcoin and the previously calculated average between SP500 and Tesla.
The idea behind calculating these averages is to find correlations and patterns between the prices of these assets, which can help identify potential trading opportunities. By comparing the average prices of different assets, the trader can look for trends and patterns that might not be apparent when looking at each asset individually.
The indicator plots these prices on a chart and fills the area between them with either green or fuchsia, depending on which one is higher. The strategy suggests buying Bitcoin when the average price of SP500 and Tesla is higher than the current price of Bitcoin, and selling when it is lower.
To add visual cues to the trading strategy, the indicator uses the plotchar function to display a small triangle below the chart when it detects a potential buying opportunity. This is done with the following parameters:
Value: BTC_SP_TE < Btc and Btc > Btc1 and Btc1 > Btc , which is a logical expression that checks whether the average price of SP500 and Tesla is less than the current price of Bitcoin (BTC_SP_TE < Btc), and whether the current price of Bitcoin is higher than the price 10 bars ago (Btc > Btc1 ) and higher than the price on the previous bar (Btc1 > Btc ).
Text: "Moyen BTC_SP_Te", which is the text to display inside the marker.
Symbol: "▲", which is the symbol to use for the marker. In this case, it is a small triangle pointing upwards.
Location: location.belowbar, which specifies that the marker should be placed below the bar.
I hope this is an example of how to create an indicator on TradingView, remember that correlations do not always last, it is possible that when you see the graph this correspondence no longer exists, do your studies and get inspired.
Altcoin Dominance (without ETH) Excluding Stablecoins UnsymetricAltcoin Dominance (without ETH) Excluding Stablecoins Unsymetric
The purpose of the script is to show Altcoin's strength without Ethereum once we exclude stablecoins.
So we look into all altcoins besides eth and besides stablecoins divided by a value of eth+btc
BTC Pair Change %This script makes it easier to quickly check how the BTC pair of the current symbol is performing on any pair.
It adds a " change percentage widge t" (of the BTC pair ) to the top right of the chart.
(Refer to the image for an example.)
The change percentage calculation is performed as described here:
www.tradingview.com
To match the "Chg%" that appears on TradingView watchlists, a 24H (1440min) timeframe is used, as described here:
money.stackexchange.com
In short, this script:
Searches for the BTC pair of the current symbol
Calculates the change % using the above described logic (links)
Adds a " change percentage widget " (of the BTC pair) to the top right of the chart
Allows for using 24H timeframe or the current timeframe (enable " Use current timeframe " under the script options)
BitCoin RSI TrendWhat is it?
This indicator will plot the RSI of BTC with a red or green background based on the top and bottom values which you can set.
How to use it?
For example, you want to trade only if the RSI of BTC is between 50 and 70, so the top value is 70 and bottom is 50. If the RSI value between those values the background will be green, else it will be red.
Why to use it?
The buy and sell strength of the BTC controls the other coins, and it is noticeable when the BTC is over sold and the RSI exceeding the 70, the price will reverse its movement to down, thus it is advisable to not open long position if the RSI of BTC is above the 70-75. Also, if the RSI is under 50 there is a big possibility to move down further to the over bought areas. The best is to buy a altcoins when the BTC RSI is between 50 and 70.
For example, I could avoid a bad long trade on MATICUSDT when the RSI of BTC is going under 50
Or, get a good long trade on MATICUSDT when the RSI of BTC is between 50 and 70
True Bitcoin Value USD - Mario MThe average mining costs of one bitcoin equals to the true intrinsic value
Globally, the Bitcoin network uses around 0.5% of the world’s electrical power supply.
The sheer amount of electrical power and complex hardware required to operate a mining farm has intrinsic value.
This gives bitcoin a fundamental cost to create, and thus intrinsic value.
BTC Indicator By Megalodon TradingThis indicator is designed help you see the potential reversal zones and it helps you accumulate for the long run.
This combines price data on any chart. The chart isolates between 0 and -100. Below -80 is a buy, above -20 is a sell location.
In these locations, try to Slowly Buy and Slowly Sell (accumulate...)
Story Of This Indicator
~I was always obsessed with Fibonacci and used Fibonacci all the time. Thus, i wanted to make a tool to see buying locations and selling locations.
Instead of drawing fibonacci's and manually interpreting buy/sell locations, i wanted algorithms to do the job for me. So, i created this algorithm and many more like it.
If you think i did a good job and want to do further work with me, feel free to contact.
I have a ton of other tools that can change everything for your trading/investing.
Best wishes
~Megalodon
QQE Student's T-Distribution Bollinger Bands ScreenerThis script scans 20 custom symbols and displays the QQE Students T-Distribution Bollinger Bandwidth as a percentage, the quarter segment percentage, a score that tells you what segment of the band the price is in, and what direction the market is going in. This is useful because it can tell you how volatile a market is and how much reward is in the market. It also tells you what direction the market is going in so you can pick a symbol that has the best looking reward. I really hope that this script complements the group of indicators I have made so far. Here is a list of the other two indicators related to this script.
Please enjoy!
FieryTrading: Buy The Dip - Sell The RipDear Tradingview community,
Today I want to share a very powerful, yet easy to use indicator with you. The indicator will find local tops or bottoms and will help you determine when it's a good time to trade a potential reversal.
How does it work?
The indicator makes use of the RSI to detect extremities and waits until the RSI reverses. Furthermore, a long-term moving average is used to determine whether we're in bullish or bearish market conditions. In bullish conditions the indicator will only go long, in bearish conditions the indicator will only go short.
How do I use it?
Favorite the indicator and apply it to your chart! You can add an alert to the indicator to receive a message once it has detected a good point for a reversal trade.
The indicator can be used on all assets and on all timeframes. Personally, I've found the 1 - 4 hourly timeframes to yield the best results.
Good luck!
BTC's #4 Whale Sells [TheSecretGuy]Hello there !
I have been tracking BTC richests wallets for some time - and one of them seems to be aligning its sells pretty well with what the market is about to do.
BTC's Whale #3 (now Whale #4) has been selling his BTC in very crutial moments - therefore I felt that converting this into an indicator will give us a pretty visual feedback of what that Whale expects to happen at a given point.
In order to do that, I have listed manually all of his sells (dates) until today and placed a vertical line on the chart on each of these dates.
This sadly can't be automated as Pinescript language doesn't allow to reach outter data - I'd need to update this manually.
Hope this helps you a bit, Cheers!
BTC Agg VolumeBTC Volumes for stablecoin trading pairs from multiple exchanges. Volume is grouped by exchanged and appears as stacked bars. Volume data can be filtered by exchange and stablecoin pair. Appearance can be resized over with an option to apply standard deviations.
Hussarya compare DJI SPX BTCScript shows relations between DJI downJones SPX and BTC:USD.
DJI chart must be set from candlestick to line
Red line is price (close). x 8
Green line ist te price BTCUSD from Binance price (close) x 1.5
Crypto Map Dashboard v1.0🔰Overview
Charts are an essential part of working with data, as they are a way to condense large amounts of data into an easy to understand format. Visualizations of data can bring out insights to someone looking at the data for the first time, as well as convey findings to others who won’t see the raw data. There are countless chart types out there, each with different use cases. Often, the most difficult part of creating a data visualization is figuring out which chart type is best for the task at hand.
What are the types of metrics, features, or other variables that you plan on plotting? Although it depended on some multiple factors!
But my choices of the chart type for this Crypto datas was Pie chart or Donut char for crypto dominances ,and Colum (Bar) chart for Total MarketCaps .
The audiences that I plan on presenting this for them could be all tradingviewrs , especially crypto lovers ,or those who just aim to have an initial exploration for themselves ,like me!
so this indicator mostly could be an educational indicator script for pine coders !
We can use the " Crypto Map Dashboard " indicator to Get an quick overview of the crypto market and monitor where the smart money Flow changing by comparing the dominances and totals Caps .
In general, it consists of 4 parts:
✅1 =>> Table1 : If you like to see and compare and monitor the changes of dominances of (Bitcoin, Ethereum, Usdt , Usdc , etc.) and their market cap in different times you can see the table on The upper-right corner.
✅2 =>> Table2: Also, in the table lower-right corner, you can see the changes of the totals(Total, Total2 , Total3 and TotalDefi) in the same time periods.
✅3 =>> pie chart or donut chart: By viewing this , you understand better about Table1 Datas, that it depicts exactly how Dominance is distributed and specialized.
✅4 =>> column chart (bar chart) : And in the last you can clearly compare the total marketcaps and see how far they are from their ATHs.
You also can even notice the entry and exit of liquidity from the crypto market!
I must also mention that I am definitely still a beginner compared to more experienced pine coders, and there may be some bugs in my codes and calculations, but I am an open person and I welcome your comments ,Also Let me know if you have any questions.
Lots of Love to all tradingviewers and pineCoder ,Cheers!💚❤️💙
Scalping The Bull - BTC Chart for Trend AnalysisName: BTC Chart for Trend Analysis
Category: Scalping, Trend Analysis .
Timeframe: 1M, 5M, 30M, 1D depending on the specific technique.
Technical Analysis: The indicator supports the operations of the trader named "Scalping The Bull" who uses BTC as an Index for Crypto trading.
Suggested usage: When trading on altcoins, to check whether or not they are trending with Bitcoin and whether those anticipate its movements.
It is therefore possible to see Bitcoin specifically if it makes red or green candles and how it is positioned with respect to the EMA 5, 10, 60, 223, however configurable from the panel.
Used in conjunction with Scalping The Bull Indicator or PRO Indicator, on the main panel.
Configuration:
EMA Length:
- EMA 1: by default 5, configurable
- EMA 2: by default 10, configurable
- EMA 3: by default 60, configurable
- EMA 4: by default 223, configurable
Colors can be modified from "Settings" > "Style"
Designed to be used with the following the indicator:
BTC Europe-America-Asia market backgrounds - 1h max frameMarket indicator - Europe - America - Asia.
Based on my trading experience. Therefore, time zones are of different sizes.
BTC spot volumeIndicator with aggregated volume for all the most actively traded bitcoin spot markets.
Can be denominated in either US dollars or the number of coins traded.
Can be displayed as stacked volume or an index that shows the percentage market share each market has.
In the settings you can exclude any market so that it only shows the individual and total volume of the markets you're interested in.
The currency it's traded against is always specified (e.g. USDT, BUSD, ...).
It's public and free for anyone to use.
BTC perpetual swaps volumeIndicator with aggregated volume for all the most actively traded bitcoin perpetual swaps.
Can be denominated in either US dollars or the number of coins traded.
Can be displayed as stacked volume or an index that shows the percentage market share each contract has.
In the settings you can exclude any contract so that it only shows the individual and total volume of the markets you're interested in.
"Linear" or "inverse" refers to the type of perpetual swap contract it is.
Inverse contracts use coin margin, so in this case BTC.
Linear contracts use some type of dollar equivalent margin like USDT for example.
The margin is always specified for the linear contracts.
It's public and free for anyone to use.
Auto Fibonacci Levels + Auto Trend Line generatorAnother indicator for you guys!!!
This indicator consists of the 5 key Fibonacci retracement levels, plotted automatically to user input settings. I also have included an auto support/resistance trend line generator.
What is a Fibonacci retracement?
'Fibonacci retracement is a method of technical analysis for determining support and resistance levels. It is named after the Fibonacci sequence of numbers, whose ratios provide price levels to which markets tend to retrace a portion of a move before a trend continues in the original direction.' - Wikipedia
How to use the Fibonacci retracement?
- The Fibonacci levels are default. These percentiles from price to the average of the high in a sample and low in a sample give you a guideline of where a bottom may be, where a top may be, and where a range is being created.
- Look for the price to reject from 61.8% and 76.4%, and also look for price to bounce from 38.2% and 23.6%. If a lower low/higher high is made, the fib levels will follow and the percentiles within will be recalculated after a 5 candle offset period.
- If you see price trending towards the lower percentiles (38&23) and using the 50% as resistance, look for a break downwards and vice versa.
-This Fibonacci set as all others is subject to fake-out, always use this with another series indicator, or don't use it as a signal for entry at all (unless you have a backdated strategy)
How to use the trend line generator?
-The trend line generator will only plot when a lower low/higher high has taken place within the input amount of candles. It is also offset by a user amount.
-The check box will give the option to have the trend line's plot or not.
- If you see a green/red dot it means that that will be your first coordinate for the trend line, and until the computations are complete it will give you an idea of which direction it will be in (resistance or support)
-When opening this indicator zoom out all the way to connect any trend lines that do not load automatically.
Let me know if you have any questions, suggestions or issues! Thank you everyone!
-Cheatcode1 :)
SP:SPX TVC:DXY BMFBOVESPA:EUR1! CME:BTC1! BINANCE:BTCUSDT
Volume Buy/Sell (by iammaximov)Buy/Sell Volume
Buy/Sell volume based on total bar amplitude (high/low price) and close/open (for calculate vbuy > vsell or vbuy < vsell)
Directional Index Macro IndicatorWhat is This For?
The default settings for this indicator are for BINANCE:BTCUSDT and intended to be used on the 3D timeframe to identify market trends. This indicator does a great job identifying whether the market is bullish, bearish, or consolidating. This can also work well on lower time frames to help identify when a trend is strong or when it's reversing.
Directional Index Rate of Change
Core to this indicator is the rate at which DI+ and DI- are moving away or towards each other. This is called The Rate of Change (ROC). "The ROC length dictates how many bars back you want to compare to the current bar to see how much it has changed. It is calculated like this:
(source - source /source ) * 100"
The rate of change is smoothed using an EMA. A shorter EMA length will cause the ROC to flip back and forth between positive and negative while a larger EMA length will cause the ROC to change less often. Since the rate of change is used to indicate periods of 'consolidation', you want to find a setting that doesn't flip back and forth too often. Between the DI+ and DI- is a blue centerline. Offset from this centerline is a channel that is used to filter out false crosses of the DI+ and DI-. Sometimes, the DI+ and DI- lines will come together in this channel and cross momentarily before resuming the direction prior to the cross. When this happens, you don't want to flip your bias too soon. The wider the channel, the later the indicator will signal a DI reversal. A narrower channel will call it sooner but risks being more choppy and indicating a false cross.
Indicator Status Line
This indicator has 4 values in the status line (in order):
DI+
DI-
Distance between DI+ and DI-
DI Rate of Change ( how quickly are DI+ and DI- moving away or towards center )
Indicator Plots
This indicator plots DI+ (green), DI- (red), and a center channel between DI- and DI+. Across the top of the indicator, red and green triangles indicate the market trend while the background changes to show whether the price is in an impulse wave or consolidating. This makes up 4 possible scenarios:
Bullish impulse wave ( green triangle up + green background )
Bullish consolidation ( green triangle up + yellow background )
Bearish impulse wave ( red triangle down + red background )
Bearish consolidation ( red triangle down + yellow background )
Summary
Combined with support and resistance levels, volume, and your other favorite indicators, this can be a useful tool for validating that your entries are not going against the trend.
Disclaimer
This is not financial advice. Do not take trades only based on the DI+ and DI- crossing. Always use multiple indicators to validate your entries and never take a trade when you aren’t emotionally grounded. Have a plan. Stick to the plan.
The screenshot for this strategy is of a manual historical review of BTC on the 3 day chart. The indicator was built to try and mimic the chart above. You’ll see that it nails it sometimes, is a little late sometimes, and chops around between consolidation and impulse waves when it should stay in consolidation. Share your settings if you are able to improve the choppiness without sacrificing catching the reversals early.
Blockchain Fundamentals - Active Address Sentiment Osc. [CR]Blockchain Fundamentals: Active Address Sentiment Oscillator AASO
Back with another script today, this one is a useful tool in helping to determine bitcoins value. We are looking at 2 data sources: the daily active addresses on the BTC blockchain, and the daily returns of BTC.
THIS INDICATOR WILL ONLY GIVE YOU THE CORRECT RESULTS ON THE DAILY TIMEFRAME
There is an interesting relationship that you can see by comparing the two timeseries. But for us to create a good indicator we first need to normalize the data. So we look at the percent change over the past 28 days for each metric (DAA and price).
THIS INDICATOR WILL ONLY GIVE YOU THE CORRECT RESULTS ON THE DAILY TIMEFRAME
We then calculate standard deviation bands around the DAA metric. We finalize them by averaging the bands over a 28 day period.
When the Price series (yellow line) is higher than the SD bands BTC is considered overvalued or price is overheated. A pullback could be expected soon. When the Price series is below the SD bands BTC is considered undervalued or price is oversold.
THIS INDICATOR WILL ONLY GIVE YOU THE CORRECT RESULTS ON THE DAILY TIMEFRAME
This tool doesnt give signals on the one minute chart or tell you exactly when to buy or sell. BUT what it does do is act as a convenient macro sentiment indicator that is not based completely upon price.
In an attempt to narrow down the really juicy areas, if you seen the background color highlights with white, that means its likely a top or bottom. At the very least on a local sense and many times in a cyclical macro sense as well. It also narrows down the signal to a generally more profitable area.
This indicator is not meant to be used on timeframes other than daily (did I mention that already?). I am lazy and did not code the calculations to be MTF (which is why you have to use on the daily chart). If you want to code this, please forward it on to me and I will post an update with a heartfelt credit to you.