My time to script this last week has been nonexistent so I’m pulling out a few old studies that I never posted to the blog. A few years back I was interested in one of the commercial trading systems being offered on the net specifically for trading futures and offering the proverbial trading secrets. This is one such study. It is a triple stochastic oscillator using the high+low/2 as the base data point. Ultimately, there is some utility in plotting three separate stochastics on one panel for both space saving reasons as well as for trading. The Stochastic Madness study was an offshoot of this study in which the analog data presented here is stripped down in favor of a purely digital representation. As with any analog to digital conversion, some of the data is always lost in the process and digital is not always better. The original analog Triple Stochastic-HL is presented below.
# TRIPLESTOCHASTICHL # (c) 2009 http://www.thinkscripter.com # thinkscripter@gmail.com # Last Update 13 APR 2009 declare lower; def over_bought = 80; def over_sold = 20; input ShortKPeriod = 5; input ShortPercentK = 3; def priceH = high; def priceL = low; def priceC = (high+low)/2; input smoothing_period = 3; input MidKPeriod = 17; input MidPercentK = 5; input LongKPeriod = 28; input LongPercentK = 14; def Sc1 = priceC - Lowest(priceL, ShortKPeriod); def Sc2 = Highest(priceH, ShortKPeriod) - Lowest(priceL, ShortKPeriod); def SFastK = Sc1/Sc2*100; def Mc1 = priceC - Lowest(priceL, MidKPeriod); def Mc2 = Highest(priceH, MidKPeriod) - Lowest(priceL, MidKPeriod); def MFastK = Mc1/Mc2*100; def Lc1 = priceC - Lowest(priceL, LongKPeriod); def Lc2 = Highest(priceH, LongKPeriod) - Lowest(priceL, LongKPeriod); def LFastK = Lc1/Lc2*100; plot STF; plot MTF; plot LTF; STF = Average(SFastK, ShortPercentK); MTF = Average(MFastK, MidPercentK); LTF = Average(LFastK, LongPercentK); STF.setDefaultColor(color.green); MTF.setDefaultColor(color.yellow); MTF.setLineWeight(2); LTF.setDefaultColor(color.magenta); LTF.SetLineWeight(3); plot OverBought = over_bought; OverBought.setDefaultColor(color.DARK_GRAY); plot OverSold = over_sold; OverSold.setDefaultColor(color.DARK_GRAY); LTF.AssignValueColor(if LTF < 20 then color.green else if LTF > 80 then color.red else color.magenta); plot MidLine = 50; Midline.SetDefaultColor(color.white);






Is there a way to have divergence indicated with a colored signal on either the OS/OB lines or at the top/bottom of the divergence itself?
Thanks
Garry,
It would be possible though I have not done it. I think Prospectus may have an indicator with divergences over on his site. There is a link to his site in the links.
Eric