Zahorchak Measure

Creator: Michael G. Zahorchak.

  • The Art of Low Risk Investing by Michael G. Zahorchak, 1977. Unfortunately, it's all but impossible to find a copy these days.
  • The Complete Guide to Market Breadth Indicators by Gregory L. Morris, 2006. A fantastic resource for those interested in Technical Analysis or creating their own trend based system.
  • Two articles by Greg Morris on the Zahorchak Measure. I can't link to them under the House Rules, but they are easily searchable.

The Zahorchak Measure (ZM) is designed to give you a market bias (either uptrend or downtrend) which you can use to determine a trade bias for ETF's or stocks.

ZM works by taking multiple moving averages of the NYSE Composite , a moving average of the NYSE advance decline line, and examining the relationship between those elements. Broadly, the market is considered to be in a uptrend when ZM is above zero, and a downtrend when below. However, there are many ways to interpret the indicator.

The version created by Greg Morris is more akin to a binary indicator in that ZM jumps from number to number. This version is smoothed to create an oscillator as it reduces whipsaws (at the expense of lag). You can set the EMA Length to 1 to go back to the original.

Some notes:

  • Michael Zahorchak called it the "Zahorchak Method", whereas Greg Morris uses the term "Measure". I'm not totally clear on the change, but Mr. Morris made some changes (covered below), so that may explain the altered name.
  • The original indicator used moving averages of 5, 15, and 40 weeks. I have converted these to daily numbers as that's the time frame I most commonly trade. You can convert the numbers back by dividing by 5.
  • The original indicator used the Dow Industrials for the moving averages, however Greg Morris switched to the NYSE Composite due to the advance decline line being based on the NYSE.
  • Greg Morris removed the 5 period moving average of the NYSE Composite , as it created increased volatility at market tops and bottoms. I tested ZM with the 5 period MA added back in, and I believe removing it creates a superior indicator.
  • I've added both Multi Time Frame functionality, and the ability to alter moving average lengths. Play around and see what you can come up with.
  • ZM oscillates between -10 and +10. There are some interesting levels creating between these two numbers (apart from the obvious zero level) - see what you can come up with.

All credit goes to Michael Zahorchak and Greg Morris for the indicator creation. I have simply reproduced their work for the TradingView community as this great indicator wasn't available.

Any queries let me know in the comments or PM me.

Script de código aberto

No verdadeiro espírito TradingView, o autor deste script o publicou com código aberto, para que os traders possam compreendê-lo e verificá-lo. Um brinde ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para utilizá-lo em um gráfico.

Quer usar esse script no gráfico?


500 moedas
I was intrigued by your script well done!
I hope you dont mind but I modified it a bit for use on 39min XBTUSD Bitmex Chart. You can adjust Buy and Sell entries to above and below mid line crossovers and crossunders and I added alerts.
should I share the syntax here in messages?
+1 Resposta
TradingSafely TradingSafely
@TradingSafely, I changed the point value to 2 and changed Nasdaq Importance Weight to 2.3, and changed Ticker to XBTUSD Bitmex
simply adjust and paste this over line 157 down.
+1 Resposta
TradingSafely TradingSafely
// ==================================================================================================================================================================+
// Plots
base = hline(0, linewidth=2, title="Base")

Pcolor = normalizedScore_smooth > normalizedScore_smooth ? color.green : color.red
plot(normalizedScore_smooth, color=Pcolor, style=plot.style_area,linewidth=2, title="Zahorchak Measure")
// Buy/Sell Signals
linebuy = input(title="Enter Long", type=input.float, defval=0.0)
linesell = input(title="Enter Short", type=input.float, defval=-0.0)
gold_cross = crossover(normalizedScore_smooth, linebuy)
death_cross = crossunder(normalizedScore_smooth, linesell)
//Crossover Plots
plotchar(gold_cross ? normalizedScore_smooth : na, title="BUY", char="🅑", location=location.absolute, color=color.blue, transp=0, size=size.small)
plotchar(death_cross ? normalizedScore_smooth : na, title="SELL", char="🅢", location=location.absolute, color=color.black, transp=0, size=size.small)
longCond = crossover(normalizedScore_smooth, linebuy)
exitLong = crossunder(normalizedScore_smooth, linesell)
alertcondition(exitLong, title="OPEN SHORT", message="OPEN SHORT")
alertcondition(longCond, title="OPEN LONG", message="OPEN LONG")
+1 Resposta
TheEconomyCreator TradingSafely
@TradingSafely, I like what you added especially the alerts. Should I simply copy the added code you put here into the script? Or do I need to do something else also?
TradingSafely TheEconomyCreator
@TheEconomyCreator, Remove //Plots from original script and copy and paste code I posted above
TheEconomyCreator TradingSafely
@TradingSafely, ok that’s what I thought. Thanks
+1 Resposta
TradingSafely TheEconomyCreator
@TheEconomyCreator, Anytime Brother!
DreamsDefined TradingSafely
@TradingSafely, Yep all good. Glad you like it, and thanks for your update!
+1 Resposta
bnfnffox2 TradingSafely
@TradingSafely, Hi can you please share your edits
Início Rastreador de Fundamentos Rastreador Forex Rastreador de Criptomoedas Calendário Econômico Sobre Recursos gráficos Preços Indique um Amigo Regras da Casa Central de Ajuda Soluções para Sites & Corretoras Widgets Soluções em Gráficos Biblioteca de Gráficos Lightweight Blog & Notícias Twitter