Original LUA oscillator: http://fxcodebase.com/code/viewtopic.php?f=17&t=40074.
Formulas:
Stochastic MACD[i] = 100*(B1[i]-MA[i]-Min)/(Max-Min), where
B1[i] = MA(Short_Length, Method, Price, i)-MA(Long_Length, Method, Price, i),
MA[i] = Moving average(B1, Signal_Length, Method, i),
Min, Max - minimum and maximum B2 at range from (i-Stochastic_Length) to i,
B2[i] = B1[i]-MA[i].
Download: