Crypto rsi cci mf stoch rsi oscillators all in one strategyThis is a strategy based on the popular oscillator like RSI, CCI, MF and Stochastic RSI oscillators.
In this situation I use a very high length , 100 candles, and the middle point between overbought and oversold levels at 50.
The entry for long is when all oscilators are above 50, and the exit is when they are below 50 + plus some minor modifications
If you have any questions, please message me a private message !
J-BTC
Momentum Strategy (BTC/USDT; 1h) - MACD (with source code)Good morning traders.
It's been a while from my last publication of a strategy and today I want to share with you this small piece of script that showed quite interesting result across bitcoin and other altcoins.
The macd indicator is an indicator built on the difference between a fast moving average and a slow moving average: this difference is generally plottted with a blue line while the orange line is simply a moving average computed on this difference.
Usually this indicator is used in technical analysis for getting signals of buy and sell respectively when the macd crosses above or under its moving average: it means that the distance of the fast moving average (the most responsive one) from the slower one is getting lower than what it-used-to-be in the period considered: this could anticipate a cross of the two moving averages and you want to anticipate this potential trend reversal by opening a long position
Of course the workflow is specularly the same for opening short positions (or closing long positions)
What this strategy does is simply considering the moving average computed on macd and applying a linear regression on it: in this way, even though the signal can be sligthly delayed, you reduce noise plotting a smooth curve.
Then, it simply checks the maximums and the minimums of this curve detecting whenever the changes of the values start to be negative or positive, so it opens a short position (closes long) on the maximum on this curve and it opens a long position (closes short) on the minimum.
Of course, I set an option for using this strategy in a conventional way working on the crosses between macd and its moving average. Alternatively you can use this workflow if you prefer.
In conclusion, you can use a tons of moving averages: I made a function in pine in order to allw you to use any moving average you want for the two moving averages on which the macd is based or for the moving average computed on the macd
PLEASE, BE AWARE THAT THIS TRADING STRATEGY DOES NOT GUARANTEE ANY KIND OF SUCCESS IN ADVANCE. YOU ARE THE ONE AND ONLY RESPONSIBLE OF YOUR OWN DECISIONS, I DON'T TAKE ANY RESPONSIBILITY ASSOCIATED WITH THEM. IF YOU RUN THIS STRATEGY YOU ACCEPT THE POSSIBILITY OF LOOSING MONEY, ALL OF MY PUBBLICATIONS ARE SUPPOSED TO BE JUST FOR EDUCATIONAL PURPOSES.
IT IS AT YOUR OWN RISK WHETHER TO USE IT OR NOT
But if you make money out of this, please consider to buy me a beer 😜
Happy Trading!
Bitcoin Funds PremiumDisplay the % premium of 4 different Bitcoin Funds relative to the price of Bitcoin in your current chart.
BTCC ETF
QBTC Fund
GBTC Trust
VBTC ETN
This indicator uses the metrics from the fund management websites to calculate the "Net Asset Value per Unit (NAVPU)" to calculate the true underlying value of the fund.
The difference is then compared to the price of Bitcoin in the chart you have open.
Note that the metrics change and therefore the graph is not accurate for long past timeframes.
If TradingView would expand their script language in a way to ingest CSV data from the funds website then this could be improved.
You can update the metrics for each fund in the settings dialogue.
The script will autodetect the currency pairs of your current graph and only display compatible funds:
BTC / USD will show BTCC.U, QBTC.U and GBTC
BTC / CAD will show BTCC and QBTC
BTC / EUR will show VBTC
The script should not show in other currency pairs so it will not mess up other charts you might switch to.
If you find bugs with this logic, please comment below so I can fix them.
Due to TradingViews "no-links in description" policy, you need to google each funds website yourself to find the current metrics. These search terms should help:
BTCC search "Purpose Bitcoin ETF"
QBTC search "3iq The Bitcoin Fund (QBTC)"
GBTC search "Grayscale® Bitcoin Trust"
VBTC search "VanEck Vectors Bitcoin ETN"
ADX Momentum cross + MacD + HH LL + Buy/Sell Signals and alerts Hello, This is the first indicator I have made and would like to contribute to the community.
This strategy came from trying to replicate a previous ADX Cross Indicator that I loved on MT4 which I used successfully on EUR/USD on high and low time frames. Through the process of trying to replicate it I failed, I decided to take what I had written so far and create my own ADX cross strategy using the combination of 3 ADX's, their lag. Then also using Higher highs and lower lows with the MacD to further filter the signals.
There are two buy and two sell conditions , the difference between these are just the order in which the ADX crossing determines the entry. The MacD and higher highs and lower lows are the same for filtering the signal.
You can change the look back for HH and LL look back range, along with the DI Length & ADX Smoothing for all ADX's. The lag used for either the buy or sell strategy with the Lag_Buy/Lag_Sell inputs. Lag_mid setting will affect all 4 conditions.
From testing and based on the ADX cross logic you should follow this structure when changing the inputs for:
DI Length: Lowest DI value (I.E. 1)
DI Lengtha: Middle DI value (I.E. 2)
DI Lengthb: Highest DI value (I.E. 3)
ADX Smoothing: Lowest Smoothing value (I.E. 1)
ADX Smoothinga: Middle Smoothing value (I.E. 2)
ADX Smoothingb: Highest Smoothing value (I.E. 3)
I tested this on the EUR/USD, but mainly I have been using it on BTC/USDT(binance) and BTC/USDT Perpetual futures(binance) with the 5 minute chart. I suggest playing around with the settings depending on the Symbol and timeframe you use because the default settings are what I last found to be optimal for my self on the 5min BTC/USDT Perpetual futures(binance) chart.
A good starting point I found when using the indicator on other charts is to use the below values:
DI Length: 7
DI Lengtha: 14
DI Lengthb: 21
ADX Smoothing: 7
ADX Smoothinga: 14
ADX Smoothingb: 21
If you have any questions, suggestions, or requests for this indicator feel free contact me. You can either comment on here or Message me
If you like this indicator please like and comment where you found it useful.
BTC Multi Exchange Perpetual PremiumThis script tracks the premium/discount of Bitcoin perpetual contracts at various exchanges.
The premium/discount is calculated against an index price. The index price is calculated from spot exchange prices and are weighted as follows:
Bitstamp:28,81%
Bittrex:5,5%
Coinbase: 38,07%
Gemini: 7,34%
Kraken: 20,28
The difference between this script and other available scripts, is that exciting script seems to only focus on one exchange. This script is also open source.
Flawless Victory Strategy - 15min BTC Machine Learning StrategyHello everyone, I am a heavy Python programmer bringing machine learning to TradingView. This 15 minute Bitcoin Long strategy was created using a machine learning library and 1 year of historical data in Python. Every parameter is hyper optimized to bring you the most profitable buy and sell signals for Bitcoin on the 15min chart. The historical Bitcoin data was gathered from Binance API, in case you want to know the best exchange to use this long strategy. It is a simple Bollinger Band and RSI strategy with two versions included in the tradingview settings. The first version has a Sharpe Ratio of 7.5 which is amazing, and the second version includes the best stop loss and take profit positions with a Sharpe Ratio of 2.5 . Let me talk a little bit more about how the strategy works. The buy signal is triggered when close price is less than lower Bollinger Band at Std Dev 1, and the RSI is greater than a certain value. The sell signal is triggered when close price is greater than upper Bollinger Band at Std Dev 1, and the RSI is greater than a certain value. What makes this strategy interesting is the parameters the Machine Learning library found when backtesting for the best Sharpe Ratio. I left my computer on for about 28 hours to fully backtest 5000 EPOCHS and get the results. I was able to create a great strategy that might be one of TradingView's best strategies out on the website today. I will continue to apply machine learning to all my strategies from here on forward. Please Let me know if you have any questions or certain strategies you would like me to hyper optimize for you. I'm always willing to create profitable strategies!
P.S. You can always pyramid this strategy for more gains! I just don't add pyramiding when creating my strategies because I want to show you the true win/loss ratio based buying one time and one selling one time. I feel like when creating a strategy that includes pyramiding right off the bat falsifies the win rate. This is my way of being transparent with you all. Have fun trading!
MA200W buy sell BTC ColoredA script to help you plan your entrances and exits with beautiful colors for BTC. It just helps to better highlight the gap between the start of the week and the end.
It only work on Weekly.
Info :
Blue ... you can wait, enjoy your life
Green is when you buy
Yellow when you enter bull market
Orange is when you begin to take care of next week
Red when you begin to sell low part
White, if while a week you see white you can sell bigs bags, if it end with White you can close majors positions
Warning White may not appear, if second week after first Red week is not White you can sell large position
Good luck and take a breath
Arbitrage Sniper (POC)Good Morning Traders!
Today I want to share with you the proof-of-concept of how you would be able to do arbitrage with crypto pairs.
THE INDICATOR MUST BE PLACED ON THE TRADING PAIR OF THE TWO CURRENCIES (i.e. ETH/BTC, EOS/ETH etc.)
This arbitrage method is based on the transitional decorrelation between the crypto treding pair and the price ratio of the involved currencies, of course computing commissions as well.
Whenever the non-arbitrage condition is not respected, there is an arbitrage oportunity.
This indicator won't consider the chance of shorting, so if the arbitrage oportunity occurs the indicator will suggest you just the chance of buying the relative-undervalued currency (but inside the code you will know how to do the alternative method as well, by shorting the relative-overvalued currency)
Let's take the trading pair ETH/BTC (as in the graph) → if we assume commissions for the 0.075% of the order, the non-arbitrage condition will be presented like this
This arbitrage method will need three orders, so n=3
So let's assume that P(ETH)/(P(BTC)*P(ETH/BTC))>(1-0.075)^(-3) → it means that the price of Ethereum is currently overreated enough (relatively to the trading pair) for doing arbitrage.
We have two alternatives:
• Buy BTC, change it into ETH (by "buying" ETH in the trading pair ETH/BTC) and then sell ETH
• Sell ETH, buy BTC, change it into ETH (by "buying" ETH in the trading pair ETH/BTC)
On the other hand, if P(ETH)/(P(BTC)*P(ETH/BTC))<(1-0.075)^(-3) → it means that the price of Ethereum is currently underrared enough (relatively to the trading pair) for doing arbitrage.
We have two alternatives:
• Buy ETH, change it into BTC (by "selling" ETH in the trading pair ETH/BTC) and then sell BTC
• Sell BTC, buy ETH, change it into BTC (by "selling" ETH in the trading pair ETH/BTC)
I'm saying that is nothing more than a proof-of-concept since:
- Arbitrage Oportunities will emerge frequently just nearly zero commissions
- Data of prices are retrieved using security() function and there can be some delay (so the arbitrage oportunity will be already extinguished by the time the signal is retrieved)
- In order to have the freshest data, repiainting will occurr
Statistical and Financial MetricsGood morning traders!
This time I want to share with you a little script that, thanks to the use of arrays, allows you to have interesting statistical and financial insights taken from the symbol on chart and compared to those of another symbol you desire (in this case the metrics taken from the perpetual future ETHUSDT are compared to those taken from the perpetual future BTCUSDT, used as a proxy for the direction of cryptocurrency market)
By enabling "prevent repainting", the data retrieved from the compared symbol won't be on real time but they will static since they will belong to the previous closed candle
Here are the metrics you can have by storing data from a variable period of candles (by default 51):
✓ Variance (of the symbol on chart in GREEN; of the compared symbol in WHITE)
✓ Standard Deviation (of the symbol on chart in OLIVE; of the compared symbol in SILVER)
✓ Yelds (of the symbol on chart in LIME; of the compared symbol in GRAY) → yelds are referred to the previous close, so they would be calculated as the the difference between the current close and the previous one all divided by the previous close
✓ Covariance of the two datasets (in BLUE)
✓ Correlation coefficient of the two datasets (in AQUA)
✓ β (in RED) → this insight is calculated in three alternative ways for educational purpose (don't worry, the output would be the same).
WHAT IS BETA (β)?
The BETA of an asset can be interpretated as the representation (in relative terms) of the systematic risk of an asset: in other terms, it allows you to understand how big is the risk (not eliminable with portfolio diversification) of an asset based on the volatilty of its yelds.
We say that this representation is made in relative terms since it is expressed according to the market portfolio: this portfolio is hypothetically the portfolio which maximizes the diversification effects in order to kill all the specific risk of that portfolio; in this way the standard deviation calculated from the yelds of this portfolio will represent just the not-eliminable risk (the systematic risk), without including the eliminable risk (the specific risk).
The BETA of an asset is calculated as the volatilty of this asset around the volatilty of the market portfolio: being more precise, it is the covariance between the yelds of the current asset and those of the market portfolio all divided by the variance of the yelds of market portfolio.
Covariance is calculated as the product between correlation coefficient, standard deviation of the first dataset and standard deviation of the second asset.
So, as the correlation coefficient and the standard deviation of the yelds of our asset increase (it means that the yelds of our asset are very similiar to those of th market portfolio in terms of sign and intensity and that the volatility of these yelds is quite high), the value of BETA increases as well
According to the Capital Asset Pricing Model (CAPM) promoted by William Sharpe (the guy of the "Sharpe Ratio") and Harry Markowitz, in efficient markets the yeld of an asset can be calculated as the sum between the risk-free interest rate and the risk premium. The risk premium of the specific asset would be the risk premium of the market portfolio multiplied with the value of beta. It is simple: if the volatility of the yelds of an asset around the yelds of market protfolio are particularly high, investors would ask for a higher risk premium that would be translated in a higher yeld.
In this way the expected yeld of an asset would be calculated from the linear expression of the "Security Market Line": r_i = r_f + β*(r_m-r_f)
where:
r_i = expected yeld of the asset
r_f = risk free interest rate
β = beta
r_m = yeld of market portfolio
I know that considering Bitcoin as a proxy of the market portfolio involved in the calculation of Beta would be an inaccuracy since it doesn't have the property of maximum diversification (since it is a single asset), but there's no doubt that it's tying the prices of altcoins (upward and downward) thanks to the relevance of its dominance in the capitalization of cryptocurrency market. So, in the lack of a good index of cryptocurrencies (as the FTSE MIB for the italian stock market), and as long the dominance of Bitcoin will persist with this intensity, we can use Bitcoin as a proxy of the market portfolio
Bitcoin Bulls and Bears by @dbtrBitcoin 🔥 Bulls & Bears 🔥
v1.0
This free-of-charge BTC market analysis indicator helps you better understand what's going with Bitcoin from a high-level perspective. At a glance, it will give you an immediate understanding of Bitcoin’s historic price channel dating back to 2011, past and current market cycles, as well as current key support levels.
Usage
Use this indicator with any BTCUSD pairs , ideally with a long price history (such as BNC:BLX )
We recommend to use this indicator in log mode, combined with Weekly or Monthly timeframe.
Features
🕵🏻♂️ Historic price channel curve since 2011
🚨 Bull & bear market cycles (dynamic)
🔥 All-time highs (dynamic)
🌟 Weekly support (dynamic, based on 20 SMA )
💪 Long-term support (channel bottom)
🔝 Potential future price targets (dynamic)
❎ Overbought RSI coloring
📏 Log/non-log support
🌚 Dark mode support
Remarks
With exception of the price channel curve, anything in this indicator is calculated dynamically , including bull/bear market cycles (based on a tweaked 20SMA), ATHs, and so on. As a result, historic market cycles may not be 100% accurately reflected and may also differ slightly in between various time-frames (closest result: Monthly). The indicator may even consider periods of heavy ups/downs as their own market cycles, even though they weren’t. Due to its dynamic nature, this indicator can however adapt to the future and helps you quickly identify potential changes in market structure, even if the indicator is no longer updated.
On top of that bullmarket cycles (colored in green) feature an ingrained RSI: the darker the green color, the more the RSI is overbought and close to a correction (darkest color in the chart = 90 Weekly RSI). In comparison with past bull cycles, it helps you easily spot potential reversal zones.
Thanks
Thanks to @quantadelic and @mabonyi which both have worked on the BTC "growth zones" indicator including the price channel, of which I have used parts of the code as well as the actual price channel data.
Follow me
Follow me here on TradingView to be notified as soon as new free and premium indicators and trading strategies are published. Inquire me for any other requests.
Enjoy & happy trading!
BTC Premium (Grayscale & Coinbase)This indicator plots the bitcoin premium on Grayscale and Coinbase in %.
Multi-Timeframe Stoch RSIGood evening folks!
Today I want to share with you a simple variant of the Stochastic-RSI built-in indicator.
Nothing too complex: by enabling the relative checkbox and setting the desired (k, d or the RSI ) source and timeframes, you can see higher timeframes data plotted on your screen.
Everything you need to do is enabling the indicator on the lowest timeframe (in this case 15 minutes), then you will see in YELLOW the information retrieved from the next higher timeframe (in this case 30 minutes) and in RED the information retrieved from the highest timeframe (in this case 45 minutes).
IT'S IMPORTANT THAT YOU DISPLAY THE INDICATOR ON THE LOWEST TIMEFRAME!
You can play with the overbought and oversold heights in order to have the best configuration you want (in oversold conditions is suggested to buy while in overbought conditions is suggested to sell)
The higher timeframes data are retrieved avoiding repainting since the method used for taking them is the 10th method described in this PineCoders Article , so, if you want to enable alerts, you SHOULD ignore the disclaimer message related to it without any problem.
Good Trading!
Trend Reversal Indicator (EMA of slopes)Good morning Traders
Inspirated by lukescream EMA-slope strategy, today I want to share with you this simple indicator whose possible use-case would be for detecting in advance possible trend reversals, specially on higher timeframes.
Once that you've chosen the desired source (RSI, EMA or Stochastic k or d), the indicator will calculate its "slope" approximating its first order derivative by the division between the last variation of the series and its last value.
You can see the slope as a white line by enabling the relative checkmark (it's disabled by default since it simply messes up the the graph)
Then, the slope itself becomes the source for two exponential moving averages: the fast one (in blue) has a period of 20 while the slow one (in red, it becomes similiar to a horizontal line actually) has a period of 500
Why the slope? Since all the sources mentioned before are directly or indirectly calculated on the price action, a more aggressiveness in the price movement would be translated into a more (positive/negative) steepness of those indicator (of course this effect would be far more evident if the indicators are calculated on low periods, but really low periods could compromise the consistency of the signals).
In this way, the slope would mirror the decisiveness of price movements and a comparison between two averages calculated from it (the first one based on more recent values, the second one that conisders also older values) could tell you in advance what direction the market is possibly about to take
The usage is simple: once that the fast moving average crosses upward the slow one, this could be a sign of potential trend reversal from bearish to bullish. On the contrary, if the fast EMA crosses downward the slow one, this could be a sign of potential trend reversal from bullish to bearish.
What I suggest you is to integrate this indicator with Exponential Moving Averages plotted on the price candles, in order to have a general bias for opening long or short positions, and with an oscillator as well such as the Stochastisc RSI in order to detect the overbought/oversold zones for opening/closing positions at the right moment.
Happy Trading!
Heikin Ashi + Price Action Crypto LONG StrategyThis is a simple and efficient crypto strategy, designed for big timeframes like 12/24h.
On history it beats buy and hold strategy in many ocasions, and because of a low DD, pyramid can be used to elevate our winnings while still keeping a low DD < 40% avg.
For the purpose of this example, I used 100% of the capital on each trades, together with a comission of 0.1%
Warning : THERE IS NO STOP LOSS ON THIS STRATEGY ,USE IT AT YOUR OWN RISK
This strategy is made with inside Heikin Ashi candles , together with some price actions logics like for long Close > High and green candle and High > High .
We exit when we have a red candle and the current close is lower than the previous Low
If you have any questions, message me in private !
Heikin-Ashi Change Strategy/ Indicator
Today I bring you a simple and efficient indicator/strategy based only on HA.
Can be used together with other TA tools or alone.
The idea behind is simple :
We have to forms to calculate the candle, using inner HA candles or normal candles. Once we have that we apply certain rules to get the max high, min low, open and close(ohlc)
With that then we check for changing in the patters like for example
For long close is higher than open and the previos close is lower than open. For short is going to be the opposite of long condition.
For the purpose of this example, I only use long direction and exit once we have the short signal.
If you have any questions, please let me know in private chat !
FTX vs BitMex BTC Perp PremiumThis script compares FTX BTC/PERP (BTC perpetual futures contract) price to Binance BTC/USDT spot and colors it red. It also plots Bitmex's BTC perpetual futures compared to Binance spot and colors it blue.
FTX = red
Bitmex = blue
Now you can easily see that you can get a 1% discount on FTX perpetuals when it is tanking. This tells you that you can set your limit buy orders extra low if you like to catch crashes. Also, you can see what your average trader on each platform is willing to pay above or below the spot premium. In general you want to do the opposite of what the average trading is doing on these exchanges unless you're in the main bull or mania phase of the Bitcoin cycle.
If you want to use Bitstamp or your favorite exchange it can be changed in the settings. Let me know if you find any settings that work well for you.
May you profit and enjoy! :)
Weighted derivatives premium BTCCan be extended with more derivative or spot pairs, see the comments in the code for instructions. Most importantly, the pairs need to be added to the respective arrays in the same order, so that the weights are applied to the correct pairs.
Momentum Strategy (BTC/USDT; 30m) - STOCH RSI (with source code)Here's a strategy for low time frames (30min suggested) for BTC , based on momentum Analysis using Stochastic RSI
By default the strategy will use the 50% of the specified capital for each trade; if "Gamble Sizing" is enabled, it will add the specified amount of capital (25% by default, until reaching the 100% limit or lower) for the next trade after having detected a loss in the previous trade; if the next trade is successful, the size for the next trade comes back to 50%
• Trend Filter LONG: If the fast exponential moving average is UNDER the slow exponential moving average , it won't open LONG positions
• Trend Filter SHORT: If the fast exponential moving average is ABOVE the slow exponential moving average , it won't open SHORT positions
• Bars delay: the strategy will wait the specified amount of bars before closing the current position; the counter is triggered as soon as the closing trade condition is verified
BY MAKING USE OF THIS STRATEGY, YOU ACKNOWLEDGE AND AGREE THAT: (1) YOU ARE AWARE OF THE RISKS ASSOCIATED WITH TRANSACTIONS OF DIGITAL CURRENCIES AND THEIR DERIVATIVES; (2) YOU SHALL ASSUME ALL RISKS RELATED TO THE USE OF THIS STRATEGY AND TRANSACTIONS OF DIGITAL CURRENCIES AND THEIR DERIVATIVES; AND (3) I SHALL NOT BE LIABLE FOR ANY SUCH RISKS OR ADVERSE OUTCOMES.
SOURCE CODE BELOW
BTC Longs & Shorts Profile WHAT DOES THIS INDICATOR DO?
I started with the idea of creating another premium indicator with a bunch of features and add it to the bundle. However, the more complex the code was becoming, the less helpful the indicator actually was. So I started from scratch and made BTC Longs & Shorts Profile super simple (as you can see in the code).
The advantage over other similar indicators is that this one has a drop-down menu and allows you to select whether you want to see Longs, Shorts, Ratio, or Difference. Having Longs and Shorts at the same time is a bit confusing because Longs pretty much dwarf the Shorts and the ups and downs are not clearly visible. Also, you can configure the colors for each visible line.
My suggestion is to add this indicator to your BTC chart, save it as a template from the top menu on TradingView and stop switching between BTC, Bitfinex Longs and Shorts. You have everything in one simple window (that's especially the case if you are not a pro or premium member and can't have more than 2 screens simultaneously).
ANYTHING ELSE ?
On a side note, if you are planning on working on a similar indicator, let me tell you what I've tried so far and it didn't work for me:
- RSI calculations including Longs and Shorts as a base
- Longs and Shorts in relation to BTC itself and a relationship with the volume
- Directional Movement Index, where Longs are DM+ and Shorts are DM-
- Smoothing both Longs and Shorts and trying to find a relationship (including some pseudo MACD lookalikes)
Anyway, if you have any ideas or suggestions on improving this indicator, please let me know. Thanks!
Best Crypto DEMA Strategy Long onlyThis is a crypto strategy suited for big time frames like 3h+.
THIS IS A LONG ONLY STRATEGY , SUITED TO BEAT BUY AND HOLD !
It's a very risky strategy because it has no stop loss at all, so be extremely careful with it.
This strategy is made of 2 DEMA a fast and a slow one.
We have two rules : entry it's when we have a crossunder between the slow DEMA and the fast DEMA. We exit when the opposite happens, in this case, when the slow is above fast.
For this example I used an initial capital of 1000 eur, using 100% of it always, and a commission of 0.2% per each deal.
BITCOIN CME FUTURES GAPSDisplays information about Bitcoin CME Futures Gaps over BTCUSD (or XBTUSD) charts.
You can configure a threshold percentage to only display gaps whose size is greater than that percentage. The gap precentage is calculated based on the current close price.
Gaps up are displayed in Orange, gaps down in Green