awesome oscillator

Download Awesome Oscillator

If you can't read please download the document

Upload: fredtag4393

Post on 11-Nov-2015

7 views

Category:

Documents


2 download

DESCRIPTION

Computer code for the Awesome oscillator.

TRANSCRIPT

Awesome Oscillator[LegacyColorValue = true]; { Larry Williams Awesome Oscillator Written by: HamFon Contact: [email protected] Date: 06/18/2003, original 06/18/2003 Revision: 1.00 Status: Gnu Public License - this indicator may be used or shared freely with no fee, as long as this original header comment is included. Purpose: Displays histogram of relationship between two moving averages. } { NOTE - be sure to set PROPERTIES for defaults as: Chart Color of PLOT1 = Green Chart Style = Histogram } inputs: Price ((H+L)/2), FastLength (5), SlowLength (34); var:AO(0); AO = AverageFC (Price, FastLength) - AverageFC (Price, SlowLength); Plot1 (AO,"AweOsc"); if Plot1 < Plot1[1] then SetPlotColor (1, red); // cross over code var:count(0); If barstatus(1) = 2 and (AO crosses above 0 or AO crosses below 0) then count = 0 else count = count + 1; Input: Txt_PcntHeight (90); Var:DispH(0),DispL(0),Disp(0),TextString1(""); DispH = Getappinfo(aihighestdispvalue) ; DispL = Getappinfo(aiLowestDispValue) ; Disp = DispH - DispL ; value31 = DispL+0.5*Disp ; TextString1 = "AO.Bars.Since.XO " + NumToStr(count,0) ; if barnumber = 1 then value25 = Text_New(Date, Time, High," " ) ; if Cvalue31 then Text_SetLocation(value25,Date, Time, DispL+Disp*Txt_PcntHeight*.01) ; Text_SetString(value25, TextString1); Text_SetColor(value25, iff(count=0,white,green)); Text_SetStyle(value25, 1, 1 ); //AutoText location ============================================================================================================= End