[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Indicator - Tick Line Momentum



PureBytes Links

Trading Reference Links



Here is the text of the code for the tick line momentum 
oscillator used earlier today on the OEX chart.  Honestly don't remember 
the source of it.
BR
 
{data1 = index, data2= NYSE TICK, K is the exponential 
smoothing constant for days or bars.  
2 day K=0.667
3 day K=0.5
5 day K=0.333
7 day K=0.25
19 day K=0.1}
 
Inputs:  Price(C of 
data2),Len1(10),Len2(5),OB(2),OS(-2),K(0.333);
Vars:  
XMA(0),Rating(0),OnBalTick(1),TLM(0),TLMA(0),TLMO(0);
 
XMA=XAverage(Price,Len1); 
Rating= 
IFF(Price>XMA[1],1,(IFF(Price<XMA[1],-1,0)));
OnBalTick=Rating+Rating[1];
TLM=OnBalTick-OnBalTick[2];  {momentum for period 
Len2}
TLMA=Average(TLM,Len2);       
{simple average of momentum}
TLMO=K*(TLMA-TLMA[1])+TLMA[1];  (exponential average of 
momentum}
 
Plot1(TLMO,"TLMO");
Plot2((0,"0");
Plot3(OB,"OB");
Plot4(OS,"OS");

Attachment Converted: "c:\eudora\attach\Tlmosc.ela"