Mean Reversion w/ Bollinger BandsThis is a more advanced version of my original mean reversion script.
It employs the famous Bollinger Bands.
This robot will buy when price falls below the lower Bollinger Band, and sell when price moves above the upper Bollinger Band.
I've only tested it on the S&P 500, though you could try it out on other assets to see the backtest performance.
During the recent COVID-19 bear market drop, it produced several buy signals on the S&P which I followed, and made some nice gains so far.
I still think this would make a better investing strategy (buy undervalued / sell over-valued), rather than a trading strategy.
I use this robot for my long term portfolio.
Index
.BXBT IndexThe current .BXBT index weighted as close as possible to BitMEX's with updates as BitMEX refreshes their index.
Difference between this and the script titled '2020 March 27 .BXBT Index': this one will receive updates because it doesn't have a date in its title.
Methodology
www.bitmex.com
"BitMEX Index Weights, assuming no constituent exchanges have been excluded due to Index Protection Rules, last updated 27 December 2019 at 12:00:05 UTC."
Binance: -
Bitstamp: 10.61%
Bittrex: 2.53%
Coinbase: 52.30%
Gemini: 6.89%
Huobi: -
Itbit: 4.21%
Kraken: 23.46%
Poloniex: -
ItBit's weight is combined with Gemini's due to ItBit not being on TradingView as of now. BITTREX:BTCUSD substituted with BITTREX:BTCUSDT*POLONIEX:USDTUSD to backfill because Bittrex only recently (late 2018) started to offer a fiat BTC/USD pair. Not that it matters since the index used in 2018 didn't include Bittrex if I remember correctly.
What is actually used for 27/12/2019 to 27/03/2020:
Binance: -
Bitstamp: 10.61%
Bittrex: 2.53%
Coinbase: 52.30%
Gemini: 11.10%
Huobi: -
Itbit: -
Kraken: 23.46%
Poloniex: -
Options:
Toggle candlesticks or close line
Change price source to be used for indicators
To be added: Change quarter to show indexes for different times, with labels that apply to the appropriate index used
Reasons to use this vs. the index itself: (not many)
It is helpful as a reference for other indicators or creation of an index.
FTX Index Advance Decline LineAs of publishing, all the tickers from FTX with the word "index" in it, plus bitcoin.
This is your regular ADL except instead of hundreds in the basket you've got them condensed into 7 (for now) and in open/close candle form instead of a line.
I'm a bit disappointed because I thought I'd lever more utility from indexes. It may just need some tweaking.
Doesn't it look like Renko?
Some notes:
Reason why it expands:
Total number of constituents is a static 7, to fix that use time to change the total variable based on dates of introduction.
Reallly looks like Renko:
Renko with ATR, length 14, hourly chart.
RPI (Relative Price Index)This is a free indicator created by Stormpike Group that displays the relative price of an underlying for the given period.
Congestion Index by KatsanosCONGESTION INDEX
Market movements can be characterized by two distinct types or phases. In the first, the market shows trending movements which have a directional bias over a period of time. The second type of market behavior is periodic or cyclic motion, where the market shows no consistent directional bias and trades between two levels. This type of market results in the failure of trend-following indicators and the success of overbought/oversold oscillators. Both phases of the market require the use of different types of indicator. Trending markets need trend-following indicators such as moving averages, moving average convergence/divergence (MACD), and so on. Trading range markets need oscillators such as the relative strength index (RSI) and stochastics, which use overbought and oversold levels. The age-old problem for many trading systems is their inability to determine if a trending or trading range market is at hand. Trend-following indicators, such as the MACD or moving averages, tend to be whipsawed as markets enter a nontrending congestion phase. On the other hand, oscillators (which work well during trading range markets) are often too early to buy or sell in a trending market. Thus, identifying the market phase and selecting the appropriate indicators is critical to a system’s success. The congestion index attempts to identify the market’s character by dividing the actual percentage that the market has changed in the past x days by the extreme range according to the following formula:
Readings between+20 and−20indicate congestion or oscillating mode. Crossing over the 20 line from below indicates the start of a rising trend. Conversely, the start of a down turn is indicated by crossing under−20 from above. The CI can also be used as an overbought/oversold oscillator.
It was taken from İntermarket Trading Strategies book of by Markos Katsanos.Read the book.
D1:=Input(“DAYS IN CONGESTION”,1,500,15);
CI:=ROC(C,D1-1,%)/((HHV(H,D1)-LLV(L,D1))/(LLV(L,D1)+.01)+.000001);
Mov ( CI ,3,E)
(Copyright Markos Katsanos 2008)
DXY COT Commercial Net PositionsThis script was created due to the lack of position of US Dollar Index Futures (DXY).
It is designed to perform a much more liquid and inclusive position analysis.
As the exponential ratios do not mean anything to positions, weights are used as multipliers instead of exponential functions.
Swedish Krona (SEK) Futures are not directly quoted in Quandl, therefore weighted in Euro / dollar parity.
By perceiving these positions as inverse correlations, you can also identify where the world economy is doing well.
COT Commercial Net Positions are calculated as (Short - Long) because of Commercials act according to the reverse of the market.
In this way, you can follow up normally instead of reverse correlation.
Because except in extreme cases, in which case capitals usually shift to Gold.
This is not the case, since there is no capital inflow to other currencies, it is not a strong sell position to the dollar index.
When there is a shift in bonds, we see the effect of the dollar in general.
I created for the Dollar Index in order not to deviate from the concept.
I wanted to share it with everyone as I thought that you have important clues about how investors take positions.
Modified currency weights :
Euro : % 61.8
Japanese Yen : % 13.6
British Pound : %11.9
Canadian Dollar : % 9.1
Swiss Franc : % 3.6
NOTE : You can use it for all instruments except crypto coins, especially US Dollar Index (DXY).
Since the COT data is taken, it will not repaint in 1 week (1W) timeframe.
The log can also be repaint according to the time of data publication.
It will repaint in lower time frames.
I hope it will help your analysis and your scripts,regards.
Commercial Movement Index-BuschiEnglish
Inspired by the book "The Commitments of Traders Bible" by Stephen Briese, this indicator is a follow-up of my already published "Commercial Index-Buschi".
Here, the Commercial Index isn't shown in values from 0 to 100, but in how far the value changed from a given timeframe (default Movement Reference: 6 weeks). Therefore it ranges from 100 (bullish move from the Commercials during the last weeks) to -100 (bearish move).
Deutsch
Inspiriert durch das Buch "The Commitments of Traders Bible" by Stephen Briese, ist dieser Indikator eine Weiterentwicklung meines bereits veröffentlichten Skriptes "Commercial Index-Buschi".
Hier wird der Commercial Index nicht in Werten von 0 bis 100 angezeigt, sondern in wieweit er sich innerhalb eines vorgegebenen Zeitfensters (Standard: Movement Reference: 6 Wochen) verändert hat. Daher schwankt er zwischen 100 (bullishe Bewegung der Commercials innerhalb der letzten Wochen) und -100 (bearishe Bewegung).
Crypto Performance vs IndexQuickly shows you if an altcoin is outperforming or underperforming it's peers. You can compare again indexes of high cap, mid cap and low cap indexes, which are provided by FTX.com. I intend to add some more features but am currently a bit busy so wanted to get it published as I've been finding it useful
Coinbase ALT/USD IndexA simple ALT/USD pair index of all the altcoins currently trading on Coinbase.
Combo Strategy 123 Reversal & CCI This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
The Commodity Channel Index (CCI) is best used with markets that display cyclical or
seasonal characteristics, and is formulated to detect the beginning and ending of these
cycles by incorporating a moving average together with a divisor that reflects both possible
and actual trading ranges. The final index measures the deviation from normal, which indicates
major changes in market trend.
To put it simply, the Commodity Channel Index (CCI) value shows how the instrument is trading
relative to its mean (average) price. When the CCI value is high, it means that the prices are
high compared to the average price; when the CCI value is down, it means that the prices are low
compared to the average price. The CCI value usually does not fall outside the -300 to 300 range
and, in fact, is usually in the -100 to 100 range.
WARNING:
- For purpose educate only
- This script to change bars colors.
Combo Strategy 123 Reversal & CCI This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
The Commodity Channel Index (CCI) is best used with markets that display cyclical or
seasonal characteristics, and is formulated to detect the beginning and ending of these
cycles by incorporating a moving average together with a divisor that reflects both possible
and actual trading ranges. The final index measures the deviation from normal, which indicates
major changes in market trend.
To put it simply, the Commodity Channel Index (CCI) value shows how the instrument is trading
relative to its mean (average) price. When the CCI value is high, it means that the prices are
high compared to the average price; when the CCI value is down, it means that the prices are low
compared to the average price. The CCI value usually does not fall outside the -300 to 300 range
and, in fact, is usually in the -100 to 100 range.
WARNING:
- For purpose educate only
- This script to change bars colors.
SHIT35 Alt Index (ROC or Volume) [LucF]SHIT35 is an index of 35 Binance alt/BTC pairs. It provides traders with a more reliable read of BTC pairs price movement than the often uncorrelated USD market cap standard.
Because it must read data coming from 35 markets, SHIT35 is painfully slow and should be kept hidden most of the time. Its features will hopefully seduce traders in using it nonetheless for market analysis.
Features
The Index can be calculated using 4 different modes:
1. Total of instant rate of change for all 35 markets ,
2. Cumulative total of ROCs,
3. Average of ROCs,
4. Plus/Minus volume (an aggregate OBV, if you will).
Select only one of the methods at a time to prevent confusion between modes.
An option allows showing the correlation between the Index as it is configured, and another instrument (CRYPTOCAP:TOTAL2 by default).
Markers can be used to identify abnormal movements in the Index. They are generated using Index exits from Bollinger bands.
The chart shows the Index with, from top to bottom, the default mode with BTC pairs, with USDT pairs, then mode 2 and 4 for BTC pairs.
Index Components
The Index is not weighed. The 35 instruments composing the index all have equivalents in the USDT quote currency on Binance, so you can easily change to those pairs using the Settings. Choosing another exchange or quote currency will require modifications to the list of instruments in the indicator’s code, since if one of the markets cannot be found, the indicator will not work. If the instrument exists but has no history for some bars, zero values will be used for them.
Watchlists
I have created a watchlist for the 35 markets in each of the BTC and USDT quote currencies. To import the watchlists, save the text you’ll find at these links in a file named the way you want your watchlist to be named and import them using the “Import Watchlist…” function.
BTC Watchlist: pastebin.com
USDT Watchlist: pastebin.com
Alerts
You can define alerts on any combination of markers you configure. After defining the markers you want the alert to trigger on, make sure you are on the interval you want the alert to be monitoring at, then create the alert, select the indicator, use the default alert condition and choose your triggering window (usually “Once Per Bar Close”). Once the alert is created, you can change the indicator's inputs with no effect on the alert.
Commodity Selection Index Backtest The Commodity Selection Index ("CSI") is a momentum indicator. It was
developed by Welles Wilder and is presented in his book New Concepts in
Technical Trading Systems. The name of the index reflects its primary purpose.
That is, to help select commodities suitable for short-term trading.
A high CSI rating indicates that the commodity has strong trending and volatility
characteristics. The trending characteristics are brought out by the Directional
Movement factor in the calculation--the volatility characteristic by the Average
True Range factor.
Wilder's approach is to trade commodities with high CSI values (relative to other
commodities). Because these commodities are highly volatile, they have the potential
to make the "most money in the shortest period of time." High CSI values imply
trending characteristics which make it easier to trade the security.
The Commodity Selection Index is designed for short-term traders who can handle
the risks associated with highly volatile markets.
WARNING:
- For purpose educate only
- This script to change bars colors.
Commodity Selection Index Strategy The Commodity Selection Index ("CSI") is a momentum indicator. It was
developed by Welles Wilder and is presented in his book New Concepts in
Technical Trading Systems. The name of the index reflects its primary purpose.
That is, to help select commodities suitable for short-term trading.
A high CSI rating indicates that the commodity has strong trending and volatility
characteristics. The trending characteristics are brought out by the Directional
Movement factor in the calculation--the volatility characteristic by the Average
True Range factor.
Wilder's approach is to trade commodities with high CSI values (relative to other
commodities). Because these commodities are highly volatile, they have the potential
to make the "most money in the shortest period of time." High CSI values imply
trending characteristics which make it easier to trade the security.
The Commodity Selection Index is designed for short-term traders who can handle
the risks associated with highly volatile markets.
Bitcoin Liquid Indexbravenewcoin.com
TV doesn't allow you to view the Bitcoin Liquid Index on lower time frames if you aren't a Premium subscriber >:(
I cheesed the system by recreating the formula that BNC uses. It isn't an exact replica, but very very close!
It can be slow to load due to the security( ) calls.
Default settings use the timeframe of the chart, however, you can set a custom timeframe if you wish.
Cheers
DasanC
Skew Index Rank-Buschi
English:
a quick and simple tampering with the SKEW Index (also known as the "Black Swan Index")
Personally, I find it quite difficult to use the SKEW Index as a reliable indicator. Nevertheless I implemented a ranking system (from 0 to 100) with the option to include a certain time period (default: 252 trading days (units)) and a moving average (default: 21 days (units)).
Feedback is most welcome to modify / improve the script.
Deutsch:
eine schnelle und einfache Bearbeitung des SKEW Index (auch als "Schwarzer Schwan Index" bekannt)
Persönlich finde ich es recht schwierig, den SKEW Index als verlässlichen Indikator zu verwenden. Trotzdem habe ich hier einfach einmal ein Ranking-System (von 0 bis 100) aufgesetzt mit der Option, einen gewissen Zeitrahmen (Standardwert: 252 Handelstage (Einheiten)) und einen gleitenden Durchschnitt (Standardwert: 21 Tage (Einheiten)) einzubinden.
Feedback ist sehr willkommen, um das Skript zu überarbeiten / zu verbessern.
Deribit Bitcoin IndexDeribit Bitcoin index, with hl2 as mid price substitute, as it tracks price more accurately than close alone.
Bitfinex excluded as Deribit has been doing so for a while now.
Canadian Dollar Currency IndexCanadian Dollar Currency Index updates in real time and doesn't close like tradingview.com's currency indexes. Based off of the Bank of Canada's CEER methodology and tracks it quite closely, although not perfectly. It seems to be higher than the Bank of Canada's index by 2 points. This could be due to using different data for the currencies and as I am not proficient in PineScript, I don't think I was able to replicate the formula exactly...? Regardless ,it works well and is more than close enough to suit one's purpose of tracking the Canadian dollar against a basket of currencies that are weighted according to the Bank of Canada's total weights (The total weight of a country j in year t is a weighted average of the their import, export and third-market competition weights). For more information on the actual Bank of Canada's index: www.bankofcanada.ca
Damping IndexThis indicator was originally developed by Curtis McKallip Jr. (Stocks & Commodities, V.10:7 (296-299): "The Damping Index").
It indentifies bars where the highs and lows are getting close and closer. A high Damping Index value means that the difference between the high price and low price is becoming lower and the security price is reaching equilibrium. A low Damping Index value means that the difference between the high and low prices is increasing.
Good luck and happy trading!