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! :)
D-XBT
[2020 Updated]Bitcoin Logarithmic Growth CurvesCredit goes to the original writer of the script, Quantadelic, who generously allowed anyone to copy/edit. I adjusted the value of the bottom/top intercept and slope to better fit the March 2020 coronavirus dip.
Use Bitstamp BTCUSD for better reading.
XBT % ContangoSimilar to my other indicators, but measures XBTUSD Contango in terms of percent.
Also, built it so you could change the values that give the red and green signals. Default values are 0% or less (backwardation) indicates green. However, i found that a 0.5% setting worked will finding local bottoms for current contract of XBTH20 (March 2020). The upper value default is at 5%, and signals red when the next contract reaches over 5%.
My assumption is as BTC increases in value over time, measuring contango in terms of percent will be a better measure of the XBT futures curve.
Stochastic Pop and Drop by Jake Bernstein v1 [Bitduke]I found a simple strategy by Jake Bernstein, modified it a little and created a strategy with Risk Management System (SL+TP); After that I test it on the different cryptocurrency pairs.
About the Indicator
Basically it's the strategy of 2 indicators: Stochastic Oscillator to define the bias and Average Directional Index to confirm it.
One again, It uses Stochastic Oscillator to define the trading bias. In particular, the trading bias was deemed bullish when the weekly 14-period Stochastic Oscillator was above some default value (in him paper - 50) and rising and vice versa.
Once the trading bias is established, Steckler used the Average Directional Index (ADX) to define a slowdown in the trend. ADX measures the strength of the trend and a move below 20 signals a weak trend.
Modifications
I didn't implement Average Directional Index (ADX) and test just different sources for data, oscillator periods and different levels in relation to the crypto market.
So, it shows good results with two tight thresholds at 55 and 45 level.
The bar chart below the defining the bullish and bearish periods (green and red) and gives a signal to enter the trade (purple bars).
Backtesting
Backtested on XBTUSD , BTCPERP (FTX) pairs. You may notice it shows good results on 3h timeframe.
Relatively low drawdown
~ 10% (from 2019 to date) FTX
~ 22% (4 years from 2016) Bitmex
I backtested on the different altcoin pairs as well, but the results were just not good.
Relatively good results were shown by some index pairs from the FTX exchange ( FTX:SHITPERP ), but I think there is a few data for backtesting to be asure in them.
Bitmex 3h (2017 - 2020) :
i.imgur.com
FTX 3h (2019 - 2020):
i.imgur.com
Possible Improvements
- Regarding trading algorithm it would be good to check with strategy with ADX somehow. Maybe for the better entries
- As for Risk Management system, it can be improved by adding trailing stop to the strategy.
Link: school.stockcharts.com
UT Bot AlertsUT Bot indicator was initially developer by @Yo_adriiiiaan
The idea of original code belongs @HPotter
These are v4 alerts for my previously published strategy:
Original script:
UT Bot Strategy with Backtesting Range [QuantNomad]UT Bot indicator was inially developer by @Yo_adriiiiaan
Idea of original code belongs @HPotter
I can't update my original UT Bot Strategy so I publishing new strategy with backtesting range included.
I just took code of Yo_adriiiiaan, cleaned it, deleted all useless pieces of code, transformet to v4 and created a strategy from it.
Also I added an input that allows you to swich to signals from Heiking Ashi. I saw that author uses HA for the indicator and on HA it look much nices then on real candles.
Do not add this strategy to HA candles, use usual candles and this checkbox.
Original script:
UT Bot
Deadband cross detection for BTC (XBT)Description: meant to be used with BTCUSD (or XBTUSD ) on 3 mins to 1h candles charts.
Idea is to provide a tool to detect break-out's from a dead band around an EMA, and to detect back-in's to the dead band.
Detection is fundamentally based on how much %, at least, a certain candle body has ruptured the dead band (adjustable).
Long and short flags are placed on the chart, as well as the deadband. Can be used to generate alers.
With minimal modifications, can be convert to a Strategy script.
Following are ideas to play around if you want. Room for improvements:
- convert constants into inputs, and diversify thresholds assimetrically
- play around with wether or not using pyramiding (here pyramiding is blocked)
- look at several bars in a sequence, not only current
Directional Movement Index + Average Directional IndexPersonal DMI and ADX script
ADX color change from positive vs negative momentum
DMI Color fill based on DMI+/- positive momentum
No fill color during lack of momentum
UT Bot StrategyUT Bot indicator was inially developer by @Yo_adriiiiaan
Idea of original code belongs @HPotter
I just took code of Yo_adriiiiaan, cleaned it, deleted all useless pieces of code, transformet to v4 and created a strategy from it.
Also I added an input that allows you to swich to signals from Heiking Ashi. I saw that author uses HA for the indicator and on HA it look much nices then on real candles.
Do not add this strategy to HA candles, use usual candles and this checkbox.
Original script:
Lancelot vstop intraday trending strategyDear all,
Free strategy again.
I found using 3 volatility stop with different settings could be very helpful when trading an intraday trending market.
With the ATR setting or 5, 10, 15, we can weed out many false break.
Vstop setting is OHLC4.
On the other hand, this strategy also utilize Renko as part of the strategy, so you could say this strategy is mainly an intraday break out trend following strategy.
Works well on BTCUSD XBTUSD, as well as other major liquid alt Pairs.
And lastly,
Save Hong Kong, the revolution of our times.
QuarryLake v4As some of you requested, I will make the code for QuarryLake Open for you all.
I have also updated the script in version 4.
This strategy consists of 3 indicators that I found works quite well together.
Keltner Channel, Waddah Attah Explosion, and Volatility Stop .
KC Period = 200
KCATR = 5
Vstop Period = 3
Vstop Mult = 1.5
Long when close > KC, close > Vstop, WAE trendUp
Short when close < KC, close < Vstop, WAE trendDown
Works well on BTCUSD XBTUSD , as well as other major liquid Pair.
This strategy utilized a modified Kelly position sizing for BTCUSD Bitstamp , feel free to modify it to your needs.
And lastly,
Save Hong Kong, the revolution of our times.
Lancelot RR StrategyDear all,
Free strategy again.
This strategy consists of 2 indicators I think works well with each other as a trend following strategy.
The 2 indicators are Renko chart and Relative Vigor Index.
This is a long-only breakout strategy that aims to capture the majority of the trend.
Works well on BTCUSD XBTUSD, as well as other major liquid Pair.
Please acknowledge my effort by like and follow.
And lastly,
Save Hong Kong, the revolution of our times.
Lancelot ATR Volume MeterThis is an experiment I did a while back ago.
I often think On Balance Volume is a great indicator as trend direction and volume cannot lie.
However, I bumped into a few problems.
It is slow, doesn't show volatility and often time it is prone to chop.
That's why I added ATR to the equation.
Original OBV calculation
src > 0? : +volume : src < 0? -volume
Modified OBV with ATR
src > 0 ? +volume * (volume / atr) : src < 0? -volume * (volume / atr)
I have used 2 ema for this modified OBV.
ema 3
ema 18
By adding ATR to the equation we can smooth out many erratic price movement. (Stop hunting)
Also, when price move slowly but steady, often prepping for a big move, this indicator will move faster.
In short, this indicator prevents you from being stop hunted and also provide great entry for a trending market.
Works well on BTCUSD XBTUSD, as well as other major liquid Pair.
Feel free to follow me on Twitter @Lancelot_Auger for more free Alpha.
Please acknowledge my effort by like and follow.
And lastly,
Save Hong Kong, the revolution of our times.
Lancelot Band - ATR Reversal+Trending IndicatorThis is an indicator I created recently, with the mind of spotting where price might reverse and where the price is trending. You can see this as the primary indicator for your system, however, it is recommended you use this in conjunction with other confirmation indicators.
This script focus solely on ATR or Average True Range.
This indicator is the combination of the baseline from the Ichimoku cloud and the concept of the Keltner channel.
Baseline period = 14
ATR period = 14
ATR Mult = 1.5
For reversal
Long when price crossover Lower band & Stop loss at xLower band
Sell when price crossunder Upper band & Stop loss at xUpper band
For Trend Following
Long when price crossover xUpper band and Stop loss at Upper band
Short when price crossunder xLower band and Stop loss at Upper band
Again, you will need other indicators to help you to succeed in this system. This indicator will not generate the best exit for your position but will generate a good entry signal when you use it with both volume indicator and exit indicator.
Works well on BTCUSD XBTUSD, as well as other major liquid Pair.
Feel free to follow me on Twitter @Lancelot_Auger for more free Alpha.
Please acknowledge my effort by like and follow.
And lastly,
Save Hong Kong, the revolution of our times.
Alert-QuarryLake Indicator Map - ATR Trend Following Strategy A lot of times I don't like my chart crowding with indicators, thus the reason for creating this script for my strategy QuarryLake.
This script also comes with alert.
Below is the explanation for QuarryLake
I have also updated the script in version 4.
This strategy consists of 3 indicators that I found works quite well together.
Keltner Channel, Waddah Attah Explosion, and Volatility Stop.
You can find WAE here
KC Period = 200
KCATR = 5
Vstop Period = 3
Vstop Mult = 1.5
Long when close > KC, close > Vstop, WAE trendUp
Short when close < KC, close < Vstop, WAE trendDown
Works well on BTCUSD XBTUSD, as well as other major liquid Pair.
Feel free to follow me on Twitter @Lancelot_Auger for more free Alpha.
Please acknowledge my effort by like and follow.
And lastly,
Save Hong Kong, the revolution of our times.
Trend Confirmation Indicator - Triple OBVDear all, you might wonder is there a confirmation indicator that has a high hit rate, is dependable, and could rely on the information it gives you when making a decision?
Here I present an indicator I developed specifically for cryptocurrency, in the minds of eliminating fakeouts and traps.
Trend is always invalid then there is a lack of volume, so by tracking the momentum of price direction & volume, we can have a ballpark about where the market is moving to.
On balance volume
obvshort = ema3
obvmedium = ema9
obvlong = ema26
This is a lagging indicator, which means it's not good at predicting reversal.
This is also the reason why
long signal = obvshort > obvmedium and obvshort > obvlong
shortsignal = obvshort < obvmedium and obvshort < obvlong
both without obvmedium >< obvlong
This indicator will not lie to you.
At last
Save Hong Kong, the revolution of our time.
CloudRest ATR based cloudThis is an indicator I have been working on for the past 2 years, developed specifically for cryptocurrency.
It is primarily a trend following indicator with great success and it performs the best in 4hrs to the weekly chart.
There are two components of this indicator.
The baseline from Ichimoku cloud and volatility stop .
baseline period = 26
volatility stop = 1.5ATR, 3
You can view this as the main component of a trend following system but you will need other confirmation indicators to confirm your entry.
Feel free to modify the script for your own system.
Feel free to follow me on twitter @Lancelot_Auger
I will be posting more content in the future, stay tuned.
And lastly,
Free hong kong, the revolution of our time!
Swaps/spot volume ratio [XBT]Inspired by @SimpeLyfe on both tradingview and twitter
Takes BitMex's XBT volume and divides it by a basket of spot exchanges volume to determine a ratio between both of them.
Has options like: Smoothing or no smoothing, Showing individual data points or data points summed up over a specified period.
Open source so enjoy!
Relative Vigor IndexHere we are looking at a trend strength indicator based on the Relative Vigor Index(RVI). The RVI measures trend strength by comparing the open-close and high-low ranges for the current and three most recent periods. As a zero-centered oscillator, the RVI oscillates above and below zero to signal the strength of the trend.
As there are different ways to interpret the RVI, we have included 3 different modes for traders to choose from in the input option menu:
1. Zero-Crossing:
The RVI Histogram will turn green when it crosses above zero and red when it crosses below. Therefore, a green RVI means the trend is bullish and red means bearish. This mode is better for longer-term swing trading in comparison to the other 2 modes.
2. Increasing / Decreasing:
The RVI histogram will turn green when it is increasing(rvi >= rvi ) and red when it is decreasing. A green RVI is viewed as a bullish signal and red means bearish. This mode is a good middle-ground between the Zero-Crossing and Signal Comparison modes.
3. Signal Comparison:
Here, the RVI is compared to its signal line. If the RVI is greater than its signal line, the histogram is green, indicating a bullish trend, while red means bearish. This mode is preferred for scalping.
Hope everyone finds this one useful!
You can check out our other invite only studies/strategies at our website: profitprogrammers.com
QuantNomad - SuperTrend - XBTUSD - 1mInteresting performance for Super Trend strategy for XBTUSD 1m chart.
Params: ST Mult: 2, ST Period 14.
Performance: 144% profit, 1988 trades, only 41% prof, 2.04% dd , 2.51 Sharpe.
On its own, it might be not a very good strategy, but the big amount of trades allows you to add more filters and improve it.
And remember:
Past performance does not guarantee future results.
Vortex Trend Tracker 2.0 + RSIHere's an updated version of our Vortex Trend Tracker indicator.
Here's the link to the original if anyone wants to read more about the Vortex or see the first version:
We've added in 4 rsi's of varying lengths for this second version(2 fast and 2 slow) that create the background color effect.
VWMA CrossesThis is a simple tool that gives traders a simple visual representation of Volume-Weighted Moving Average ( VWMA ) crossovers that is pretty similar to the MACD . We don't typically trade solely based on the VWMA , but it is definitely one of our go-to tools when combining multiple indicators.
When trading with VWMA's, it is common to enter a position when the fast VWMA crosses over the slow VWMA . In other words, the fast VWMA was previously less than the slow VWMA and is now greater in value than the slow VWMA . Conversely, traders often exit their positions when the fast VWMA crosses under the slow VWMA .
This tool plots the absolute value of the difference between the fast and slow VWMA's as a histogram. When the difference between the fast and slow VWMA's is greater than zero (meaning fast > slow), then the bars are green. The bars then turn red when the fast VWMA is less than the slow VWMA . The blue circle-line is a Simple Moving Average of the difference between the two lines.
Here's a quick guide to interpreting the chart:
if (fast VWMA > slow VWMA ) and (difference < sma of differences)
then color = lime green
if (fast VWMA > slow VWMA ) and (difference > sma of differences)
then color = dark green
if (fast VWMA < slow VWMA ) and (difference < sma of differences)
then color = light red
if (fast VWMA < slow VWMA ) and (difference > sma of differences)
then color = dark red
~Happy Trading~
Vortex Trend TrackerThough it may sound complex, the Vortex Indicator is essentially an uptrend line and a downtrend line. The vortex indicator can be used for a variety of purposes, including tracking the strength of trends, identifying/anticipating reversals, and generating entry/exit signals. It’s calculation is shown in the open-source code below.
To reduce the number of whipsaws produced by the indicator, we used an Exponential Moving Average of vmPlus and vmNegative values with a default length of 10. Decreasing this length will result in a more responsive vortex at the cost of more whipsaws and false signals.
The chart shows the absolute value of the difference between the uptrend and downtrend line displayed as the main histogram.
If the uptrend line is greater than the downtrend (thus indicating positive movement), then the histogram bars will be either light green or dark green. If the uptrend line has just now crossed the downtrend line, then the bar will be dark green. Bars will also be dark green when the uptrend line is greater than the downtrend line and the uptrend line is increasing. This means the trend is increasing in strength still. If the uptrend line is greater than the downtrend line, but is decreasing, then the bars will be light green. This means that the upwards trend is losing strength.
If the downtrend line is greater than the uptrend line, then there is a negative trend occurring and the bars will be either red or light red. If the downtrend line has just crossed over the uptrend line or is increasing in value, then the bar will be red. If the downtrend line is greater than the uptrend line, but is decreasing in value, then the bars will be light red (meaning the downtrend is weakening).
One way to trade using this vortex is to enter a long position when the bar color changes from red to light red. This would mean that the downtrend is decreasing in strength and an upwards reversal is likely to occur soon. Then, traders can exit their long position when the bars change from dark green to light green. When that color change occurs it means that the uptrend is running out of steam and price is unlikely to continue its upwards climb.
Traders can also choose to have the uptrend and downtrend lines plotted as well in the input menu. This may make it easier to visualize the Vortex and its usefulness in identifying reversals.