Martin Pring's SPECIAL K
I found this while surfing around for some longer trend indicators the other day and thought I'd code it up and see what it looked like. I hadn't seen it for ToS anywhere previously.It looks interesting. May be useful for some who use it long term. Also looks an interesting chart for intraday tick charts if you want to determine possible changes in the overall trend of the day... Let me know if / how you find it useful and why or why not.
This version is adapted from pseudo code here: https://school.stockcharts.com/doku.php?st=pring special k&id=technical_indicators:pring_s_special_k ad I make no claim of ownership to either the original code nor this interpretation of it.
LINK
http://tos.mx/oTIc7ukEye Candy
5 year daily
1 day 250 tick
The Code
Code:
# Martin Pring's SPECIAL K
#
# as coded for ThinkOrSwim
#
# by mashume for useThinkScript.com
#
# from pseudo code here: https://school.stockcharts.com/doku.php?st=pring%20special%20k&id=technical_indicators:pring_s_special_k
#
# 2021-12-16
declare lower;
input k_ma_length = 100;
script ROC {
input n = 10;
plot ROC = ((Close - Close[n]) / (Close[n])) * 100;
}
plot Special_K = SimpleMovingAvg(price = ROC(10), length = 10) * 1
+ SimpleMovingAvg(price = ROC(15), length = 10) * 2
+ SimpleMovingAvg(price = ROC(20), length = 10) * 3
+ SimpleMovingAvg(price = ROC(30), length = 15) * 4
+ SimpleMovingAvg(price = ROC(40), length = 50) * 1
+ SimpleMovingAvg(price = ROC(65), length = 65) * 2
+ SimpleMovingAvg(price = ROC(75), length = 75) * 3
+ SimpleMovingAvg(price = ROC(100), length = 100) * 4
+ SimpleMovingAvg(price = ROC(195), length = 130) * 1
+ SimpleMovingAvg(price = ROC(265), length = 130) * 2
+ SimpleMovingAvg(price = ROC(390), length = 130) * 3
+ SimpleMovingAvg(price = ROC(530), length = 195) * 4;
plot K_MA = SimpleMovingAvg(price = Special_K, length = k_ma_length);
plot zero = 0;
Special_K.SetDefaultColor(Color.BLUE);
K_MA.SetDefaultColor(Color.RED);
zero.SetDefaultColor(Color.GRAY);
Happy Trading
-mashume