OPEN-SOURCE SCRIPT
Z-Score For Loop | MisinkoMaster

The Z-Score For Loop is a new trend following oscillator designed to catch reversals ahead of anyone else, providing users with top tier signals.
It works like so:
1. Calculate the Z-score of the source (like close, open etc.)
The formula is the following
(current value - mean)/Standard Deviation
For mean there is the option to use different types of averages, this allows for more flexibility, but the recommendation is using mainly SMA/EMA, maybe WMA, because the other ones might cause too much noise.
This itself is pretty noisy, so we now need to filter it a bit, which is where the next step comes in
2. Add the For Loop Logic
Basicly, what this means is that we compare the current Z-score value to the previous values, rewarding it for every previous score it beats, and punishing it for every previous score it is lower than.
This comes in handy, because using other filtering methods like the median, Average (e.g. MA) or even mode did smooth it, but made it suffer a lot of speed. The For Loop balanced the speed & noise really well, which lead to it being fast & accurate.
The idea of using the For Loop was that the Z-score was anything but lagging on its own - which is good if you want speed, but the falses it gave was unforgivable.
Adding a bit of lag to it smoothed it and made it acceptable noise wise, and really good speed wise.
The For Loops work really well as trend Following tools, and the Z-score is a concept I never saw being used in a For Loop before (correct me if I am wrong), which lead to this being quite a convenient choice for indicator and publishing
It works like so:
1. Calculate the Z-score of the source (like close, open etc.)
The formula is the following
(current value - mean)/Standard Deviation
For mean there is the option to use different types of averages, this allows for more flexibility, but the recommendation is using mainly SMA/EMA, maybe WMA, because the other ones might cause too much noise.
This itself is pretty noisy, so we now need to filter it a bit, which is where the next step comes in
2. Add the For Loop Logic
Basicly, what this means is that we compare the current Z-score value to the previous values, rewarding it for every previous score it beats, and punishing it for every previous score it is lower than.
This comes in handy, because using other filtering methods like the median, Average (e.g. MA) or even mode did smooth it, but made it suffer a lot of speed. The For Loop balanced the speed & noise really well, which lead to it being fast & accurate.
The idea of using the For Loop was that the Z-score was anything but lagging on its own - which is good if you want speed, but the falses it gave was unforgivable.
Adding a bit of lag to it smoothed it and made it acceptable noise wise, and really good speed wise.
The For Loops work really well as trend Following tools, and the Z-score is a concept I never saw being used in a For Loop before (correct me if I am wrong), which lead to this being quite a convenient choice for indicator and publishing
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.