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
บิทคอยน์ (สกุลเงินดิจิตอล)
Binance Z VolumeBTC perpetual volume on Binance is about 4x spot volume.
Comparing spot and perpetual volumes could provide useful insights into market sentiment.
Abnormal increases in the spot market could be associated with accumulation. Abnormal increases in the perpetual market, on the other hand, could predict volatility as well lows and highs.
This script represents a Z-score of the volume of perpetual and 4xspot on Binance.
High values above 0 mean that the volume is skewed towards perpetual contracts. Values below 0 mean that the volume is skewed towards spot contracts.
Feel free to suggest changes and improvements of this script.
Translated with www.DeepL.com (free version)
BIO
Fibonacci EMAs / Trend and Chopzone identifier Implementation from the highly recommended course "Pinescript Indicator Development" on Udemy
www.udemy.com
This indicator is mostly to show some techniques in Pinescript rather than be useful for trading, however it does nicely identify trend and chop zones (sideways) on the 1-hour or 4-hour chart.
What it does:
- Has three EMAs at varying length and plots these on the chart
- Computes when the EMAs are in bullish configuration (EMA short > Medium > long)
- Computes when EMAs are in bearish configuration (EMA short < Medium < long)
- When the EMAs are crossed there is a chop zone (sideways)
- Colours the background of the chart as Green (bullish), Red (bearish) or Orange (sideways chop zone)
- Also predicts the value of the three EMA's three points into the future using linear regression (showed as dots on the chart)
KAMA Strategy - Kaufman's Adaptive Moving AverageThis strategy combines Kaufman's Adaptive Moving Average for entry with optional KAMA, PSAR, and Trailing ATR stops for exits.
Kaufman's Adaptive Moving Average is, in my opinion, a gem among the plethora of indicators. It is underrated considering it offers a solution that intuitively makes a lot of sense. When I first read about it, it was a real 'aha!' moment. Look at the top, pink line. Notice how during trending times it follows the trend quickly and closely, but during choppy, non-trending periods, the KAMA stays absolutely flat? Interesting! To trade with it, we simply follow the direction the KAMA is pointing. Is it up? Go long. Is it down? Go short. Is it flat? Hold on.
How does it manage to quickly follow real trends like a fast EMA but ignore choppy conditions that would whipsaw a fast EMA back and forth? It analyses whether recent price moves are significant relative to recent noise and then adapts the length of the EMA window accordingly. If price movement is big compared to the recent noise, the EMA window gets smaller. If price movement is relatively small or average compared to the recent noise, the EMA window gets bigger. In practice it means:
The KAMA would be flat if a 20 point upwards move occurred during a period that has had, on average, regular 20 point moves BUT
the KAMA would point up if a 20 point move occurred during a period that has, on average, had moves of only around 5 points.
In other words, it's a slow EMA during choppy flat / quiet flat periods, and a fast EMA as soon as significant volatility occurs. Perfect!
-----
The Strategy
The strategy is more than just a KAMA indicator. It contains:
KAMA exit (optional)
ATR trailing stop loss exit (optional)
PSAR stop loss exit (optional)
KAMA filter for entry and exits
All features are adjustable in the strategy settings
The Technical Details:
Check out the strategy's 'Inputs' panel. The buy and sell signals are based on the 'KAMA 1' there.
KAMA 1: Length -- 14 is the default. This is the length of the window the KAMA looks back over. In this instance, it c
KAMA 1: Fast KAMA Length -- 2 is the default. This is the tightest the EMA length is allowed to get. It will tend towards this length when volatility is high.
KAMA 1: Slow KAMA Length -- 20 is the default. This is the biggest the EMA length is allowed to get. It will tend towards this length when volatility is low.
KAMA Filter
The strategy buys when the KAMA begins to point up and sells when the KAMA points down. Generally, the KAMA is very good at filtering out the noise itself - it will go flat during noisy/choppy periods. But to add another layer of safety, its author, Perry Kaufman, proposed a KAMA filter. It works by taking the standard deviation of returns over the length of the the 'KAMA 1: Length' I mentioned above and multiplying it by an 'Entry Filter' (1 by default) and 'Exit Filter' (0.5 by default). The entry condition to go long is that the KAMA is pointing up and and it moved up more than 1 x St. Dev. of Returns. The exit condition is when the KAMA is pointing down and it moved down by more than 0.5 x St. Dev. of Returns.
Thanks
Thanks to ChuckBanger, cheatcountry, millerrh, and racer8 for parts of the code. I was able to build upon their good work.
-----
I hope this strategy is helpful to you.
Do you have any thoughts, ideas, or questions? Let me know in the comments or send me a message! I'd be glad to help you out.
If you need an indicator or strategy to be built or customised for you, let me know! I'll be glad to help and it'll probably be cheaper than you think!
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!
Ark Crypto HeatlineThis is the 'on chart' indicator. See also "Ark Crypto Heatband" indicator for a side-by-side BTC view, without a re-scaled line.
The crypto landscape is largely dominated by BTC and characterised by cyclical stages with varying degrees of mean reversion.
To understand what stage of the cycle we are currently experiencing, it is useful to examine to what degree the current price has extended beyond the long term average that BTC has established. This is true even when analysing other crypto assets as BTC is the dominant force in the crypto asset class.
This indicator uses the 1400 period daily SMA , which is broadly the 200 period weekly SMA. This can be configured, but historically has represented a baseline to which BTC commonly returns.
The graph plots current price in terms of multiples of this long term average. Traditionally, at multiples beyond 10, BTC is considered overextended with a higher likelihood of trending towards the mean thereafter. Colors indicate the extent of price extension.
Where the indicator is applied to non BTCUSD pairs, a smoothed conversion is applied, seeking to superimpose the BTC long period SMA onto the current chart.
The indicator specifically references BTC by default on all charts, as it is designed to use BTC as general purpose indication of where crypto as a whole currently sits. Accordingly the indicator is only to be used on crypto charts.
For best results on BTC, using BNC:BLX will give the longest historical view.
Ark Crypto HeatbandThe crypto landscape is largely dominated by BTC and characterised by cyclical stages with varying degrees of mean reversion.
To understand what stage of the cycle we are currently experiencing, it is useful to examine to what degree the current BTC price has extended beyond a long term average. This is true even when analysing other crypto assets and helpful to view side by side.
This indicator uses the 1400 period daily SMA, which is broadly the 200 period weekly SMA. This can be configured, but historically has represented a baseline to which BTC commonly returns.
The graph plots current price in terms of multiples of this long term average. Traditionally, at multiples beyond 10, BTC is considered overextended with a higher likelihood of trending towards the mean thereafter. Colors indicate the extend of price extension.
The indicator specifically references BTC by default on all charts as it is designed to use BTC as general purpose indication of where crypto as a whole currently sits. Accordingly the indicator is only to be used on crypto charts.
rocketLaunchI wanted to see if I could programmatically identify the conditions I saw just before Bitcoin broke its all-time high end of 2020. The signal picks up several rocket launch moments prior to launching which is quite cool. It also picks up a few false starts, however. In any case, I would have loved to be stopped out on those false starts but been there for all the starts this thing picks up.
It could probably use more confirmatory elements such as trailing conditions and volume perhaps?
BINANCE:BTCUSDTPERP
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
Bitcoin Comparison to GBTC!This script tells you if GBTC is overvalued or undervalued compared to Bitcoin.
200 Week Moving Average HeatmapСolors part of the SMA depending on the change in % (delta %) to the previous value. From blue(none to low increase) through green(moderate increase) to red(high increase).
gold price levels denominated in usd/gramsPlots the gold price (USD) for the quantities (grams) identified as support or resistance in the indicator settings. Default values are:
75 gold grams
300 gold grams
500 gold grams
1000 gold grams
5000 gold grams
More context: The purchasing power of Bitcoin
World market Session Information for bitcoinIt marks out different world markets active timings on the bitcoin charts.
You can also modify the script to a strategy and test out different strategies.
Finex PremiumBitfinex:BTCUSD premium/discount compared to market average spot exchanges.
Smoothed option available.
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.
[MACLEN] HODL ZONE RENKO
PLEASE READ!
Trade at your own risk. Please read about renko charts before using this indicator. This indicator is for educational purposes only.
This Indicator is only valid in renko charts with 1 second timeframe. For BTCUSDT . With the traditional method and the size box of 80.
With this indicator we can detect zones of buy and sell. Even that is not recommended to use leverage, I use it to find an entry and use only small leverages. It could be also used to accumulate and HODL bitcoin .
Please, comment anything.
POR FAVOR LEER!
Tradea bajo tu propio riesgo. Por favor lee sobre las graficas renko antes de usar este indicador. Este indicador es solamente con fines educativos.
Este indicador es válido solamente en graficas renko con un timeframe de 1 segundo. Para BTCUSDT . Con cajas del método tradicional de un tamaño de 80.
Con este indicador podemos detectar zonas de compra y venta. A pesar de que no es recomendable usar apalancamiento, yo lo uso para encontrar entradas y solo uso apalancamientos pequeños. También podría usarse para acumular y holdear bitcoin .
Por favor, escríbeme cualquier duda o comentario.
Bitcoin Binance Sentiment IndexThe divergence of the price between the futures and spot markets for perpetual contracts could be a gauge of sentiment on a traded cryptoasset.
Sentiment analysis could be used to improve the the predictive value of technical and fundamental analysis.
The price of the perpetual contract is divided by the spot price for Bitcoin on Binance and two simple moving averages of this ratio are plotted together. For graphical purposes, the ratio between the two prices has been multiplied by 100. The moving averages were chosen arbitrarily and can be changed. Values above 100 mean that the average price of the futures over the last x periods was above the spot price over the same period. Conversely, values below 100 mean that the mean price of the futures over the last x periods was below the spot price over the same period. The indicator has been created for a daily timeframe.
This indicator is clearly intended for educational purposes only and does not constitute investment advice.
If you are interested in updates on this indicator or interested on sentiment analysis, put a like, subscribe or contact me in pm.
BIO
ARI-DPO TrendThis is a new indicator that uses DPO (Detrended Price Oscillator) and calculating its HMA 200 and EMA 200 is able to show the current price direction.
if the line is below 0 the market is in a downtrend in the short term, otherwise, the market is in an uptrend.
if the line is red, the market is in a downtrend in the long term (bearish), otherwise, the market is in a long term uptrend (bullish)
a sequence of red/green lines means that the market is choppy
Currently, I'm using it with cryptocurrencies to assess if the short term price action.
How it works:
the indicator calculates the DPO (default 21 periods) and its HMA (default 200 periods) and EMA (default 200 periods) and shows if the DPO is above both HMA and SMA (indicator line above 0 and green), below both (indicator line below 0 and red) or between (the indicator line and the colour are not matching: e.g. red line above the zero or green line below zero). the latter is the classic situation of a choppy market or a possible short term reversal.
The aim of this indicator is to find a good entry point for long/short positions.
I'm still testing and improving it, please
let me know in the comments if you find this useful. Cheers!