OPEN-SOURCE SCRIPT
已更新 Z-Score Momentum | MisinkoMaster

The Z-Score Momentum is a new trend analysis indicator designed to catch reversals, and shifts in trends by comparing the "positive" and "negative" momentum by using the Z-Score.
This approach helps traders and investors get unique insight into the market of not just Crypto, but any market.
A deeper dive into the indicator
First, I want to cover the "Why?", as I believe it will ease of the part of the calculation to make it easier to understand, as by then you will understand how it fits the puzzle.
I had an attempt to create a momentum oscillator that would catch reversals and provide high tier accuracy while maintaining the main part => the speed.
I thought back to many concepts, divergences between averages?
- Did not work
Maybe a MACD rework?
- Did not work with what I tried :(
So I thought about statistics, Standard Deviation, Z-Score, Sharpe/Sortino/Omega ratio...
Wait, was that the Z-Score? I only tried the For Loop version of it :O
So on my way back from school I formulated a concept (originaly not like this but to that later) that would attempt to use the Z-Score as an accurate momentum oscillator.
Many ideas were falling out of the blue, but not many worked.
After almost giving up on this, and going to go back to developing my strategies, I tried one last thing:
What if we use divergences in the average, formulated like a Z-score?
Surprise-surprise, it worked!
Now to explain what I have been so passionately yapping about, and to connect the pieces of the puzzle once and for all:
The indicator compares the "strength" of the bullish/bearish factors (could be said differently, but this is my "speach bubble", and I think this describes it the best)
What could we use for the "bullish/bearish" factors?
How about high & low?
I mean, these are by definitions the highest and lowest points in price, which I decided to interpret as: The highest the bull & bear "factors" achieved that bar.
The problem here is comparison, I mean high will ALWAYS > low, unless the asset decided to unplug itself and stop moving, but otherwise that would be unfair.
Now if I use my Z-score, it will get higher while low is going up, which is the opposite of what I want, the bearish "factor" is weaker while we go up!
So I sat on my ret*rded a*s for 25 minutes, completly ignoring the fact the number "-1" exists.
Surprise surprise, multiplying the Z-Score of the low by -1 did what I wanted!
Now it reversed itself (magically). Now while the low keeps going down, the bear factor increases, and while it goes up the bear factor lowers.
This was btw still too noisy, so instead of the classic formula:
a = current value
b = average value
c = standard deviation of a
Z = (a-b)/c
I used:
a = average value over n/2 period
b = average value over n period
c = standard deviation of a
Z = (a-b)/c
And then compared the Z-Score of High to the Z-Score of Low by basic subtraction, which gives us final result and shows us the strength of trend, the direction of the trend, and possibly more, which I may have not found.
As always, this script is open source, so make sure to play around with it, you may uncover the treasure that I did not :)
Enjoy Gs!
This approach helps traders and investors get unique insight into the market of not just Crypto, but any market.
A deeper dive into the indicator
First, I want to cover the "Why?", as I believe it will ease of the part of the calculation to make it easier to understand, as by then you will understand how it fits the puzzle.
I had an attempt to create a momentum oscillator that would catch reversals and provide high tier accuracy while maintaining the main part => the speed.
I thought back to many concepts, divergences between averages?
- Did not work
Maybe a MACD rework?
- Did not work with what I tried :(
So I thought about statistics, Standard Deviation, Z-Score, Sharpe/Sortino/Omega ratio...
Wait, was that the Z-Score? I only tried the For Loop version of it :O
So on my way back from school I formulated a concept (originaly not like this but to that later) that would attempt to use the Z-Score as an accurate momentum oscillator.
Many ideas were falling out of the blue, but not many worked.
After almost giving up on this, and going to go back to developing my strategies, I tried one last thing:
What if we use divergences in the average, formulated like a Z-score?
Surprise-surprise, it worked!
Now to explain what I have been so passionately yapping about, and to connect the pieces of the puzzle once and for all:
The indicator compares the "strength" of the bullish/bearish factors (could be said differently, but this is my "speach bubble", and I think this describes it the best)
What could we use for the "bullish/bearish" factors?
How about high & low?
I mean, these are by definitions the highest and lowest points in price, which I decided to interpret as: The highest the bull & bear "factors" achieved that bar.
The problem here is comparison, I mean high will ALWAYS > low, unless the asset decided to unplug itself and stop moving, but otherwise that would be unfair.
Now if I use my Z-score, it will get higher while low is going up, which is the opposite of what I want, the bearish "factor" is weaker while we go up!
So I sat on my ret*rded a*s for 25 minutes, completly ignoring the fact the number "-1" exists.
Surprise surprise, multiplying the Z-Score of the low by -1 did what I wanted!
Now it reversed itself (magically). Now while the low keeps going down, the bear factor increases, and while it goes up the bear factor lowers.
This was btw still too noisy, so instead of the classic formula:
a = current value
b = average value
c = standard deviation of a
Z = (a-b)/c
I used:
a = average value over n/2 period
b = average value over n period
c = standard deviation of a
Z = (a-b)/c
And then compared the Z-Score of High to the Z-Score of Low by basic subtraction, which gives us final result and shows us the strength of trend, the direction of the trend, and possibly more, which I may have not found.
As always, this script is open source, so make sure to play around with it, you may uncover the treasure that I did not :)
Enjoy Gs!
版本注释
Added new plotting option.开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。