Moren Information about: Link: 1) www.forexdeluxe.com/technical-indicators/elliot-oscillator.htm |
Source Code "Elliot Oscillator": |
||
function init() { with (EO) { createBuffer("EO"); setBufferColor("EO", "lime"); setBufferDrawStyle("EO", DrawStyle.HISTOGRAM); setAutoChangeMaxMin("EO"); createParameter("ShortMA", 5); createParameter("SLongMA", 34); } } function start() { EO.label = "Elliott Oscillator (" + EO.parameter("ShortMA") + ", " + EO.parameter("SLongMA") + ")"; var num = Shared.numberOfQuotes(); var Low = Shared.low(); var High = Shared.high(); var EOBuf = new Array(num); var Buf = new Array(num); for (var i = 0; i < num; ++i) { Buf[i] = (High[i] + Low[i]) / 2; } Buf1 = Shared.sma(EO.parameter("ShortMA"), Buf); Buf2 = Shared.sma(EO.parameter("SLongMA"), Buf); for (var i = 0; i < num; ++i) { EOBuf[i] = Buf1[i] - Buf2[i]; } EO.setBufferData("EO", EOBuf); } |