More Information about: Link: 1) www.tradecision.com/support/indicators/kurtosis_indicator.htm Calculation: Mov(Mov(Mo(3)-Ref(Mo(3),-1),66,E),3,S) |
Source Code "Kurtosis Indicator": |
||
function init() { with (KI) { createBuffer("KI"); setBufferColor("KI", "lime"); setBufferDrawStyle("KI", DrawStyle.LINE); setAutoChangeMaxMin("KI"); createParameter("Kurtosis", 3); createParameter("FK", 66); createParameter("FSK", 3); createParameter("Level", 0); fullName = "Kurtosis Indicator"; } } function start() { KI.label = "Kurtosis (" + KI.parameter("Kurtosis") + ") + FK(" + KI.parameter("FK") + ") + FSK(" + KI.parameter("FSK") + ")"; KI.removeAllLevels(); KI.addLevel(KI.parameter("Level"), "white"); var num = Shared.numberOfQuotes(); var KiBuf = new Array(num); var Temp = new Array(num); var MoBuf = Mo(); for (var i = 1; i < num; ++i) { KiBuf[i] = MoBuf[i]-MoBuf[i-1];; } Temp = Shared.ema(KI.parameter("FK"), KiBuf); KiBuf = Shared.ema(KI.parameter("FSK"), Temp); KI.setBufferData("KI", KiBuf); } function Mo() { var Mo = Shared.getIndicator("Momentum"); Mo.init(); Mo.setParameter("Period", KI.parameter("Kurtosis")); Mo.start(); return Mo.bufferData("Momentum"); } |