PureBytes Links
Trading Reference Links
|
I thought I'd post some of my tools that I've been using in return for all
of the wonderful codes "The Code" has been posting.
Have fun trading,
Andy
fomerly Logan467@xxxxxxx (left aol because of all ridiculous surge in
advetisements; the price increase when everyone else was decreasing their
cost was the straw that broke the camel's back...)
Again, I'm using William Blau's TSI as the main oscillator. I'd suggest a
reading on his book on momentum if you want more details (forgot the title
of the book but it had momentum somewhere in the title).
*******************************************************
{indicator: Adpative Zones TSI}
Input: R(21),S(12),Lback(50),PCent(.95);
Vars: Osc(0),HH(0),LL(0),Rng(0),VrRng(0),Ob(0),Os(0);
Osc=Mtm(R,S);
{define a user function named MTM; here's the code for it:
Inputs: R(numeric),S(numeric);
if C-C[1]<>0 then Mtm=Xaverage(Xaverage(C-C[1]),R),S)/
Xaverage(Xaverage(AbsValue(C-C[1]),R),S)
else Mtm=Mtm[1]}
{Highest and Lowest Values of Osc during Lookback Period}
HH=Highest(Osc,Lback);
LL=Lowest(Osc,Lback);
{Range of Osc during Lookback Period}
Rng=HH-LL;
{Define Variable PerCentage of Range to determine OB and OS levels}
VrRng = Rng * (PCent);
{Calculate OB and OS levels}
Ob=LL + VrRng;
Os=HH - VrRng;
Plot1(Osc,"Osc");
Plot2(Ob,"OB");
Plot3(Os,"OS");
Plot4(0,"zero");
*********************************************
{System Adpative Zones TSI}
Input: R(21),S(12),Q(4),Lback(50),PCent(.95);
Vars: Osc(0),HH(0),LL(0),Rng(0),VrRng(0),Upper(0),Lower(0),Avg(0);
Osc=Mtm(R,S);
Avg=XAverage(Mtm(R,S),Q);
HH = Highest(Osc,Lback);
LL = Lowest(Osc,Lback);
Rng = HH - LL;
VrRng = Rng* (PCent);
Upper = LL + VrRng;
Lower = HH - VrRng;
If Osc crosses above Lower then buy on close;
If Osc crosses below Avg then exitlong on close;
If Osc crosses below Upper then sell on close;
If Osc crosses above Avg then exitshort on close;
----------------------------------------------------------------------------
---
"For a pint of Guinness, I'll give you all of my trading secrets...
Dat's is, if youse can ondurstanz my Brooklynese!!"
|