MAC-Z Indicator [LazyBear]This indicator is a composite of MACD and Z-Score (requested by @ChartAt). The general idea is that counter-trend component of the Z-score is used to adjust/improve the trend component of the MACD. The advantage is that it is a more accurate and “assumption-free” and can more accurately describe how a market or stock actually works in a given time frame.
I have also added support to smooth out the MAC-Z using Laguerre filter (Thanks @TheLark for the excellent LMA). Note that smoothing removes the "noise" component additive of Z-Score, so you may miss some good signals. By default Laguerre smoothing is OFF, I suggest playing with the Gamma to see if you can find a proper trade-off value.
Theme credits --> @liw0
More info:
cssanalytics.wordpress.com
Indicators
BBImpulse IndicatorBBImpulse is part of the latest indicators package offered by John Bollinger. Excerpt from their market blurb (www.bbforex.com):
"BBImpulse is derived from %b. Its value is the periodic change of %b, so if %b was 0.45 this period and 0.20 last period the present value of BBImpulse is 0.25. We present two reference levels on the chart, an alert level and an impulse level."
"Generally the market moves in the direction of the latest alerts and/or impulses except towards the end of a move where one can take advantage of exhaustion/reversal signals from this indicator."
"Ian Woodward employs BBImpulse for his Kahuna signals using key levels of 0.24 and 0.40."
I added support for the following:
- Highlighting alert/impulse trigger bars
- Rendering the range (check options page).
I noticed that the range, by itself, highlights lot of info:
- Tapering in (narrowing) of range may signify topping or falling prices.
- Tapering out (expanding) may signify nearing a bottom or rising prices.
- Range getting "ranged" between alert or impulse levels signify a major move in the direction of the last impulse trigger. I think for this, alert level ranging intensity is greater than impulse level ranging intensity.
Someone more familiar with BB will have more observations, I am sure. Please do share here so we BB noobs can learn :)
For more indicators, check out my complete list here:
Squeeze Momentum Indicator [LazyBear]
Fixed a typo in the code where BB multiplier was stuck at 1.5. Thanks @ucsgears for bringing it to my notice.
Updated source: pastebin.com
Use the updated source instead of the what TV shows below.
This is a derivative of John Carter's "TTM Squeeze" volatility indicator, as discussed in his book "Mastering the Trade" (chapter 11).
Black crosses on the midline show that the market just entered a squeeze (Bollinger Bands are with in Keltner Channel). This signifies low volatility, market preparing itself for an explosive move (up or down). Gray crosses signify "Squeeze release".
Mr.Carter suggests waiting till the first gray after a black cross, and taking a position in the direction of the momentum (for ex., if momentum value is above zero, go long). Exit the position when the momentum changes (increase or decrease --- signified by a color change). My (limited) experience with this shows, an additional indicator like ADX / WaveTrend, is needed to not miss good entry points. Also, Mr.Carter uses simple momentum indicator, while I have used a different method (linreg based) to plot the histogram.
More info:
- Book: Mastering The Trade by John F Carter
List of all my indicators:
Indicator: Trend Trigger FactorIntroduced by M.H.Pee, Trend Trigger Factor is designed to keep the trader trading with the trend.
System rules according to the developer:
* If the 15-day TTF is above 100 (indicating an uptrend), you will want to be in long positions.
* If the 15-day TTF is below -100, you will want to be short.
* If it is between -100 and 100, you should remain with the current position.
More info:
Original Article by Mr.Pee: drive.google.com
Indicator: Price Headley Accelaration Bands [LazyBear]The Acceleration Band System was published in "Big Trends in Trading" by Price Headley in 2002. The system designed to catch stocks as they start to trend but before they go parabolic. The system is simple but supposed to be very effective.
This system makes use of %R and ADX a lot to determine the entries/exits. Refer to the documents listed below for the complete set of rules.
More info:
* System Trading Rules: drive.google.com
* www.bigtrends.com
* www.slideshare.net
Indicator: HawkEye Volume IndicatorHawkEye volume, developed by Nigel Hawks, is supposed to be a premier VSA indicator. Documentation on this is scarce (looks like the training seminars/sessions conducted by the parent company cover this in detail), if you come across any (other than what I have mentioned on that chart) do let me know.
I am not sure how much this resembles the commercial indicator out there as I don't have access to one (noticed the "clone" part? :) ). This is a direct port of a similar MT4 indicator. If you have access to the commercial indicator in another platform, do post some comparison results.
_CM_BarRange_PercentileI know a Trader that went 18 months without a losing trade. This Trader averaged trading 700-800 contracts per month in the Futures markets.
The was not his only system but here were his rules.
He looked at the 60 minute bar and calculated the ranges of the bars over the last 3 months. IF the range of the Bar was Greater Than the 99th Percentile, He would Fade that move or take the trade in the opposite direction.
Thought process is If the Price Bar is Greater Than the 99th Percentile then typically the market reverses. This happens a lot of times at news events. If you’ve studied the markets long enough you know if a Nes based event causes a Huge Move, which we define as Greater than the 99th Percentile, the Market typically moves in the opposite direction.
***This is dependent on the Instrument your trading and the time frame your trading. Some Instruments and time frames this signals a continuation move.
I also added in the Low of the Range based on the 99th Percentile. Often times Low Range Bars…especially if they appear at the top of a swing move, or the bottom of a swing move…create a high probability entry once the High or Low of the bar is taken out in the opposite direction of the previous move…The Low Range bars show indecision after a strong move and create great reversal opportunities.
Works on All Time Frames…again depending on the instrument your trading.
On instruments that MOVE or have High Volatility like Crude and Oil you can get great signals on 1 minute bars.
***Code includes ability to pick ham many bars you want your Look Back Period To Be.
***You can change the percentages to use the 99th Percentile, or 95th percentile, etc…
***The Green Line is the Value of the High Range Percentile.
***The Red Line is the Value of the Low Range Percentile.
***Plots a Magenta Cross on the Red Line if the Range is Below the Low Range Percentile.
***Plots a yellow Cross on the Green Line if the Range is Greater Than the High Range Percentile.
***The Aqua line is the Midpoint of the Range. Or the Average Price Move.
***Colors the Price Bar Yellow if the Range exceeds the High Range Percentile.
***Colors The Bar Magenta if the Range is Less Than the Low Range Percentile
***All parameters can be turned on or off via Check Boxes in the Inputs Tab
Kaufman Stress IndicatorStress Indicator, first proposed by Mr. Perry Kaufman, provides an easy way for trading pairs / arbs.
Kaufman's trading rules for Stress Indicator:
- Decide on a pair to trade: For ex., AAPL v QQQ
- Calculate the Stress Indicator (SI) for that pair
- Buy the stock when SI 50
- Calculate the 60-day moving average of QQQ
- If the trend of QQQ is down, hedge the stock position with QQQ equal to the risk of the stock using the 20-day ATR of each
- Exit the hedge when the stock position exits, or exit the hedge when the trend of QQQ turns up
- Do not trade stocks under $3
Explanation of all potential SI applications is beyond this post. For more info:
- ptasite.s3.amazonaws.com
- www.futuresmag.com
- kaufmansignals.com
- TASC 2014 March issue.
Though Kaufman's Stress stategy is built on top of this Stress Indicator, I suggest reading up his full strategy guidelines before applying this.
Kaufman suggests using 60SMA on the index to track the slope. I have included a custom SMA (find it in the middle pane) that can show SMA for any selected symbol. Use the guide below to import that in to your charts: drive.google.com
We Are Witnessing A Historical Event With A Clear Outcome!!!"Full Disclosure: I came across this information from www.SentimenTrader.com
I have no financial affiliation…They provide incredible statistical facts on
The General Market, Currencies, and Futures. They offer a two week free trial.
I Highly Recommend.
The S&P 500 has gone 43 trading days without a 1% daily move, up or down.
which is the equivalent of two months and one day in trading days.
During this stretch, the S&P has gained more than 4%,
and it has notched a 52-week high recently as well.
Since 1952, there were nine other precedents. All of
these went 42 trading days without a 1% move, all of
them saw the S&P gain at least 4% during their streaks,
and all of them saw the S&P close at a 52-week highs.
***There was consistent weakness a week later, with only three
gainers, and all below +0.5%.
***After that, stocks did better, often continuing an Extraordinary move higher.
Charts can sometimes give us a better nuance than
numbers from a table, and from the charts we can see a
general pattern -
***if stocks held up well in the following
weeks, then they tended to do extremely well in the
months ahead.
***If stocks started to stumble after this two-
month period of calm, however, then the following months
tended to show a lot more volatility.
We already know we're seeing an exceptional market
environment at the moment, going against a large number
of precedents that argued for weakness here, instead of
the rally we've seen. If we continue to head higher in
spite of everything, these precedents would suggest that
we're in the midst of something that could be TRULY EXTRAORDINARY.
Volume Flow Indicator [LazyBear]VFI,introduced by Markos Katsanos, is based on the popular On Balance Volume (OBV) but with three very important modifications:
* Unlike the OBV, indicator values are no longer meaningless. Positive readings are bullish and negative bearish.
* The calculation is based on the day's median (typical price) instead of the closing price.
* A volatility threshold takes into account minimal price changes and another threshold eliminates excessive volume.
A simplified interpretation of the VFI is:
* Values above zero indicate a bullish state and the crossing of the zero line is the trigger or buy signal.
* The strongest signal with all money flow indicators is of course divergence.
I have exposed options to plot a signal EMA. All parameters are configurable.
Markos suggests using 0.2 coeff for day trading and 0.1 for intra-day.
More info:
www.precisiontradingsystems.com
ValueChart Indicator [LazyBear]This indicator displays the trend-adjusted price activity of a security. It oscillates around the zero-line. It is usually plotted as OHLC, but Pine doesn't have this support yet. So, I have rendered OHLC separately (see chart for the details).
This indicator is particularly useful for ‘scalping’ in a sideways market, where there is limited movement taking place, rather than a trending market undergoing larger swing movements.
I am not sure how much this resembles the commercial indicator out there as I don't have access to one. This is a direct port of a similar TOS indicator.
Removed direct links.
Indicators: Rainbow Charts Oscillator, Binary Wave and MAsRainbow Charts, by Mel Widner, is a trend detector. It uses recursively smoothed MAs (remember, this idea was proposed back in 1997 -- it was certainly cool back then!) and also builds an oscillator out of the MAs. Oscillator bands indicate the stability range.
I have also included a simple binary wave based on whether all the MAs are in an upward slope or not. If you see any value above 0.5 there, the trend is definitely up (all MAs pointing up).
More info:
www.traders.com
Here's my complete list of indicators (With these 3, the total count should be above 100 now...will update the list later today)
Indicator: Krivo Index [Forex]Krivo index, suggested by Richard Krivo, tries to quantify the "strength" of a currency by checking how many of its pairs are trading strongly (close above 200sma). As you can see from the chart, KI gives an excellent overview of their strength. Note how it correctly points out the JPY crash (Nov 2012).
I decided to implement KI for each currency separately to be compliant with Pine requirements. Also, this enables to add only the needed currency KI scripts (for ex., just CAD_KI and USD_KI). You can add the needed currency KI scripts and merge them all together to form a chart like this. Make sure you "right click" on all and select "Scale Right" (or "Scale Left". Thing to note is all KIs shd be aligned to the same scale).
I have published KI for only 5 currencies now, but can add more on request. BTW, this index is usable on all time frames.
More info on KrivoIndex:
-----------------------------
www.dailyfx.com
JPY crashing:
-----------------------------
webcache.googleusercontent.com
Euro Slump:
-----------------------------
www.bloomberg.com
Please see the comment below for the complete list of currency pairs I used for deriving these indexes.
Indicators: KaseCD & Kase Peak OscillatorI have included ports of 2 indicators from MT4 (not from the original commercial source). I couldn't cross check if these matched their commercial equivalents (you need to assume they don't!). If you own any of these in other platforms, appreciate if you could publish some comparison results here.
Kase Peak Oscillator is the difference between two trend measurements, one for rising markets and the other for falling markets. KCD is the PeakOsc minus its own average. So, KPO takes the place of a traditional oscillator and the KCD takes place of the traditional MACD.
Ms.Kase claims KCD is far more accurate than MACD.
More info:
- www.kaseco.com
- beathespread.com
Let me know if you have experience with the original indicators and are willing to help improve these clones. Thanks.
Indicators: Chartmill Value Indicator & Random Walk IndexChartMill Value Indicator & Modified ChartMill Value Indicator :
-------------------------------
Developed by Dirk Vandycke, CVI tracks how far the price spread is from its MA. Since MA keeps increasing even when price consolidates or stalls, it is very difficult for the deviation from a moving average to remain in the overbought or oversold regions for extended periods, which represents a significant improvement over other oscillators such as the RSI and Stochastic indicators.
However, a simple price spread from a moving average would not be comparable across all securities, which would preclude us from using the spread in systematic strategies. Fortunately, Mr.Vandycke addresses this problem by dividing the spread by the average true range, which is dependent on both the price level and volatility of the underlying security.
There is a variation of CVI called Modified CVI, which does time normalization of ATR (not the MA). This indicator supports displaying "Modified CVI" too. Check the options page.
This indicator is best used with other oscillators, to confirm signals. Zero line (in this case, "1" line since the gray line is drawn at the value of 1) crossovers should also be considered as signals.
I suggest tuning the OB/OS levels to match your instrument (usually it is around 0.5/-0.5 range).
More info:
www.traders.com
Random Walk Index
-------------------------
RWI is used to determine if an issue is trending or in a random trading range (like ADX/Aroon). It attempts to do this by first determining an issue's trading range. The next step is to calculate a series of RWI indexes for the maximum look-back period. The largest index move in relation to a random walk is used as today's index.
Michael Poulos, inventor of RWI, recommends 2 to 7 for the short-term time frames and 8-64 for long terms. An issue is trending higher if the long term RWI of highs is greater than 1, while a downtrend is indicated if the long term RWI of lows is greater than 1.
Below are some more rules developed by Mr.Poulos:
- Enter a long (or close short) when the long-term RWI of the highs is greater than 1 and the short-term RWI of lows peaks above 1
- Enter short (or close long) when the long-term RWI of the lows is greater than 1 and the short-term RWI of highs peaks above 1
More info:
- tradingsim.com
For displaying only the histogram (as shown in the bottom pane), select "ShowOnlyHistogram" in the options page.
Indicator: Relative Volume Indicator & Freedom Of MovementRelative Volume Indicator
------------------------------
RVI is a support-resistance technical indicator developed by Melvin E. Dickover. Unlike many conventional support and resistance indicators, the Relative Volume Indicator takes into account price-volume behavior in order to detect the supply and demand pools. These pools are marked by "Defended Price Lines" (DPLs), also introduced by the author.
RVI is usually plotted as a histogram; its bars are highlighted (black, by default) when the volume is unusually large. According to the author, this happens if the indicator value exceeds 2.0, thus signifying that a possible DPL is present.
DPLs are horizontal lines that run across the chart at levels defined by following conditions:
* Overlapping bars: If the indicator spike (i.e., indicator is above 2.0 or a custom value)
corresponds to a price bar overlapping the previous one, the previous close can be used as the
DPL value.
* Very large bars: If the indicator spike corresponds to a price bar of a large size, use its
close price as the DPL value.
* Gapping bars: If the indicator spike corresponds to a price bar gapping from the previous bar,
the DPL value will depend on the gap size. Small gaps can be ignored: the author suggests using
the previous close as the DPL value. When the gap is big, the close of the latter bar is used
instead.
* Clustering spikes: If the indicator spikes come in clusters, use the extreme close or open
price of the bar corresponding to the last or next to last spike in cluster.
DPLs can be used as support and resistance levels. In order confirm and refine them, RVI is used along with the FreedomOfMovement indicator discussed next.
Freedom of Movement Indicator
------------------------------
FOM is a support-resistance technical indicator, also by Melvin E. Dickover. FOM is the ratio of relative effect (relative price change) to the relative effort (normalized volume), expressed in standard deviations. This value is plotted as a histogram; its bars are highlighted (black, by default( when this ratio is unusually high. These highlighted bars, or "spikes", define the positioning of the DPLs.
Suggestions for placing DPLs are the same as for the Relative Volume Indicator discussed above.
Note that clustering spikes provide the strongest DPLs while isolated spikes can be used to confirm and refine those provided by the Relative Volume Indicator. Coincidence of spikes of the two indicator can be considered a sign of greater strength of the DPL.
More info:
S&C magazine, April 2014.
I am still trying these on various instruments to understand the workings more. Don't forget to share what you learn -- any use cases / ideal scenarios / gotchas, would love to hear them all.
Indicator: Elder Impulse SystemAccording to Elder, "The Impulse System encourages you to enter a trade cautiously but exit fast, by identifying inflection points where a trend speeds up or slows down. This is the professional approach to trading, the total opposite of the amateur's style. Beginners jump into trades without thinking too much and take forever to get out, hoping and waiting for the market to turn their way."
The Impulse System is based on two indicators, a 13-day exponential moving average and the MACD-Histogram. The moving average identifies the trend, while the MACD-Histogram measures momentum. As a result, the Impulse System combines trend following and momentum to identify impulses that can be traded.
By default it uses your chart's time frame, but you can set it to any custom time frame via options page. Optionally, price bars can be color coded too.
More info:
stockcharts.com
Steps to import / use custom indicators from this chart:
PDF: drive.google.com
Indicators: Volume-Weighted MACD Histogram & Sentiment Zone OscVolume-Weighted MACD Histogram
-------------------------------------------------------------------------------------
Volume-Weighted MACD Histogram, first discussed by Buff Dormeier, is a modified version of MACD study. It calculates volume-averaged Close price for finding the histogram.
More info:
www.moneyshow.com
Sentiment Zone Oscillator
-------------------------------------------------------------------------------------
Sentiment Zone Oscillator, developed by Walid Khalil, is a complementing oscillator to VZO and PZO.
To quote Walid:
>> The sentiment zone oscillator (SZO) is a leading contrary oscillator that measures the extreme emotions of a single market or share.
>> It measures and defines both extremes, bullishness (overoptimism) and bearishness (overpessimism), that could lead to a change
>> in sentiment, eventually changing the trend of the time frame under study. The SZO was devised on the belief that after several waves
>> of rising prices, investors begin to get bullish on the stock with increasing confidence since the price has been rising for some time.
>> The SZO measures that bullishness/bearishness and marks overbought/oversold levels.
SZO has its own oversold/overbought bands. Also, when SZO goes above 7, it indicates extreme optimism. When the SZO goes below -7, it indicates extreme pessimism.
More info: www.traders.com
How to import / use custom indicators from this chart?
-------------------------------------------------------------------------------------
PDF: drive.google.com
Indicator: WaveTrend Oscillator [WT]WaveTrend Oscillator is a port of a famous TS/MT indicator.
When the oscillator is above the overbought band (red lines) and crosses down the signal (dotted line), it is usually a good SELL signal. Similarly, when the oscillator crosses above the signal when below the Oversold band (green lines), it is a good BUY signal.
I have marked some cross-overs in the above chart. As you can see, they are *not* the only useful signals WT generates. Try it on your instrument and let me know what you think.
Indicators: Volume Zone Indicator & Price Zone IndicatorVolume Zone Indicator (VZO) and Price Zone Indicator (PZO) are by Waleed Aly Khalil.
Volume Zone Indicator (VZO)
------------------------------------------------------------
VZO is a leading volume oscillator that evaluates volume in relation to the direction of the net price change on each bar.
A value of 40 or above shows bullish accumulation. Low values (< 40) are bearish. Near zero or between +/- 20, the market is either in consolidation or near a break out. When VZO is near +/- 60, an end to the bull/bear run should be expected soon. If that run has been opposite to the long term price trend direction, then a reversal often will occur.
Traditional way of looking at this also works:
* +/- 40 levels are overbought / oversold
* +/- 60 levels are extreme overbought / oversold
More info:
drive.google.com
Price Zone Indicator (PZO)
------------------------------------------------------------
PZO is interpreted the same way as VZO (same formula with "close" substituted for "volume").
Chart Markings
------------------------------------------------------------
In the chart above,
* The red circles indicate a run-end (or reversal) zones (VZO +/- 60).
* Blue rectangle shows the consolidation zone (VZO betwen +/- 20)
I have been trying out VZO only for a week now, but I think this has lot of potential. Give it a try, let me know what you think.
Indicators: 6 RSI variationsAs we all know, as published by Wilder, RSI makes use of "CLOSE" values. You probably have experimented changing the input to hl2 or hlc3 . I have included many other RSI variations in this chart. Refer to the developers section below to learn how you can use this code in your scripts.
1) RSI with Volume
---------------------------------------------
Suggested by Morris, this idea adds volume to the RSI indicator. Because volume offers one means of determining whether money is entering or leaving a market, this would provide additional information with which to make trading decisions.
2) RSI using last Open
---------------------------------------------
This is RSI with yesterday's open, This basically compares two full days of price action and in the process produces a smoother RSI line.
RSI of today's close is used as a signal (blue line).
3) RSI using SMA
---------------------------------------------
Wilder used his own MA for calculating RSI (check my post on Wilders MA here - -- This closely resembles EMA). One of Morris's suggestion is to try out SMA.
Compared to normal RSI, you will see more squiggles here.
4) RSI using EMA
---------------------------------------------
Same idea as above, but using EMA.
5) RSI with Fibs
---------------------------------------------
How much does RSI retrace? This makes it easy to determine that :)
6) RSI of MACD
---------------------------------------------
As I mentioned earlier, RSI is a pluggable formula. You can substitute "close" with any data series to derive an index out of it.
This shows RSI of MACD. Note that this is range bound.
More info on RSI variations:
drive.google.com
For Pinescript developers:
---------------------------------------------
You can substitute your favorite indicator in the RSI function. I have made the RSI calculation a separate function in all the indicators above.
Following are the reusable functions (simply copy to your script and call with proper arguments):
* WiMA(src, length)
* calc_rsi(fv, length): This is equivalent to stock rsi() in TV.
* calc_rsi_volume(fv, length)
* calc_rsi_sma(fv, length)
* calc_rsi_ema(fv, length)
* calc_rsi_lastopen(fv, length)
* calc_macd(src, fast, slow)
You can also pick up fibs drawing code and put in on any indicator.
Indicators: Butterworth & Super Smoother filtersThese indicators, from John Ehlers' book "Cybernetic Analysis for Stocks and Futures", are EMA alternatives.
The basic idea behind all these is to try to get smoothing with as little lag as possible. As you can see from the chart, they are much smoother, have better response, and a closer match to market prices.
Basically, all the responsiveness of a faster EMA, with the smoothing of a slower EMA :)
Indicators: Better Volume Indicator & InstrumentVolumeBetter Volume Indicator
-----------------------------------------
This is a direct port of a famous indicator from Tradestation platform.
BVI improves on your typical volume histogram by coloring the bars based on 5 criteria:
* Volume Climax Up – high volume, high range, up bars (red)
* Volume Climax Down – high volume, high range, down bars (white)
* High Volume Churn – high volume, low range bars (green, barcolor= blue)
* Low Volume – low volume bars (yellow)
* Volume Climax plus High Volume Churn – both the above conditions (magenta)
When there are no volume signals the default histogram bar coloring is cyan.
Bars can also be colored to match volume color. Enable "Change BarColors?" in the options page.
Volume Climax Up bars are typically seen at:
* The start of up trends
* The end of up trends, and
* Pullbacks during down trends.
Volume Climax Down bars are typically seen at:
* The start of down trends
* The end of down trends, and
* Pullbacks during up trends.
High Volume Churn bars are typically seen at:
* The end of up trends
* The end of down trends, and
* Profit taking mid-trend.
Low Volume bars are typically seen at:
* The end of up trends
* The end of down trends, and
* Pullbacks mid-trend.
More info:
emini-watch.com
Instrument Volume
-----------------------------------------
This is a simple script that allows you to plot volume for any instrument.
Very handy when you want to compare volumes. Just add multiple instances and select the symbol you want via Options page.
This script also gets close/open for the selected symbol. If you are itching to get started on Pinescripting (scripting language used at TV), I suggest trying out the following, using this script as the template:
- Show RSI for any instrument
(hint: "close" for the selected symbol is already in script. Do a "plot(rsi(c, 14))")
- MACD / CCI / ....
- Plot the difference (not correlation). This may be of interest in some instruments.
For ex. BTC in BTCE exchange mostly lags BITSTAMP.
Hope this piques your interest in Pine. Feel free to post in the Pinescript room if you have any queries.