PureBytes Links
Trading Reference Links
|
<x-html><HTML>
TS and SC Traders
<P>Recently jdundee@xxxxxxxxxxxxxxx has reminded up of Pivots.
<P>For a number of years I have looked on Pivots and the associated
<BR>Resistance/Support zones with interest.
<P>I finally decided to do something about it and used one of the indicators
<BR>which I had which showed the R1, R2, S1, S2 points.
<P>I am a short term position trader (mostly ED, JY, and OEX) and I did
<BR>not quite see how this was of help but I wondered what things would
<BR>look like if I averaged the R1R2 values and then did an XAverage of
<BR>these averages. Also the same for the S1S2 values.
<P>I am attaching a .ela file with this indicator
in it -- different lengths
<BR>for R1R2 and S1S2 can be input. (Code is also listed below for
<BR>those "cut and paste" fans.)
<P>From this I got the idea that something might be viable as a short
<BR>(or maybe long) term position trading system after I noticed that
<BR>once High prices tended to remain over the R1R2 average lines for
<BR>a number of days then the prices seemed to be in a trend and continue
<BR>higher. Same appeared true for Low price below S1S2 average
<BR>lines.
<P>The attached .ela file also contains a system
that makes use of
<BR>this observation. The system worked pretty good from 1980 to
<BR>now on the JY and seems to be applicable for the OEX. I have
<BR>NOT done extensive testing of the parameters and/or type of equity
<BR>to which this is applied so you had better investigate yourself.
<P><TT>This is info that I have for period 1980 to 1997:</TT>
<BR><TT>JY $129,728 940%</TT>
<BR><TT>BP 84,961
391%</TT>
<BR><TT>DM 59,358
364%</TT>
<BR><TT>SF 66,038
350%</TT>
<BR><TT>US 49,645
274%</TT><TT></TT>
<P><TT>All were run with same parameters as JY (which</TT>
<BR><TT>had been optimized). An optimization of US</TT>
<BR><TT>resulted in $81,095 / 526%.</TT><TT></TT>
<P><TT>These are pretty robust figures I would think! ! ! !</TT><TT></TT>
<P><TT>Code for indicators, functions, and system are below.</TT><TT></TT>
<P><TT>CODE (TS) FOR INDICATOR - - - - - - - - - - - - - - - - - -</TT><TT></TT>
<P><TT>Input: LenAvgR(5),LenAvgS(5);</TT><TT></TT>
<P><TT>Value1=LeePivotR12Average(LenAvgR)[1];</TT>
<BR><TT>Value2=LeePivotS12Average(LenAvgS)[1];</TT>
<BR><TT>If Value2>Value1 then Value2=LeePivotS12Average(LenAvgR)[1];</TT><TT></TT>
<P><TT>Plot1(Value1,"Res");</TT>
<BR><TT>Plot2(Value2,"Supt");</TT>
<BR><TT>Plot3((Value1+Value2)*.5,"Pivot");</TT><TT></TT>
<P><TT>CODE (TS) FOR NECESSARY FUNCTIONS - - - - - - - - - - - - -</TT><TT></TT>
<P><TT>{ *******************************************************************</TT>
<BR><TT> </TT>
<BR><TT> Function : LeePivotR12Average</TT>
<BR><TT> </TT>
<BR><TT> Last Edit : 9/25/97</TT><TT></TT>
<P><TT> Provided By : Clyde Lee,Futursmagic (c) Copyright 1997</TT><TT></TT>
<P><TT> Function called with length of exponential average to</TT>
<BR><TT> compute Average of average of the well know</TT>
<BR><TT> Pivot/Support/Resistence points.</TT>
<BR><TT> Resistance 1</TT>
<BR><TT> Resistance 2</TT>
<BR><TT> levels of commodity prices.</TT><TT></TT>
<P><TT> Values derived are for use in evaluation of TOMORROWS</TT>
<BR><TT> price support/resistance points.</TT><TT></TT>
<P><TT>********************************************************************}</TT><TT></TT>
<P><TT>Inputs: Length(NumericSimple);</TT><TT></TT>
<P><TT>Vars: Pivot(0),R1(0),R2(0),S1(0),S2(0);</TT>
<BR><TT>Vars: XAlpha(2/(Length+1)),XBeta(1-Xalpha),XAvgR12(C);</TT><TT></TT>
<P><TT>Pivot = ((O+H+L+C)*.25);</TT>
<BR><TT>R1 = (2*Pivot)-L;</TT>
<BR><TT>S1 = (2*Pivot)-H;</TT>
<BR><TT>R2 = Pivot-(S1-R1);</TT>
<BR><TT>{S2 = Pivot-(R1-S1);}</TT><TT></TT>
<P><TT>XAvgR12=XavgR12*XBeta+(R1+R2)*.5*XAlpha;</TT><TT></TT>
<P><TT>LeePivotR12Average=XAvgR12;</TT>
<BR><TT></TT>
<BR><TT></TT>
<BR><TT></TT>
<BR><TT></TT>
<BR><TT></TT> <TT></TT>
<P><TT>{ *******************************************************************</TT>
<BR><TT> </TT>
<BR><TT> Function : LeePivotS12Average</TT>
<BR><TT> </TT>
<BR><TT> Last Edit : 9/25/97</TT><TT></TT>
<P><TT> Provided By : Clyde Lee,Futursmagic (c) Copyright 1997</TT><TT></TT>
<P><TT> Function called with length of exponential average to</TT>
<BR><TT> compute Average of average of the well know</TT>
<BR><TT> Pivot/Support/Resistence points.</TT>
<BR><TT> Support 1</TT>
<BR><TT> Support 2</TT>
<BR><TT> levels of commodity prices.</TT><TT></TT>
<P><TT> Values derived are for use in evaluation of TOMORROWS</TT>
<BR><TT> price support/resistance points.</TT><TT></TT>
<P><TT>********************************************************************}</TT><TT></TT>
<P><TT>Inputs: Length(NumericSimple);</TT><TT></TT>
<P><TT>Vars: Pivot(0),R1(0),R2(0),S1(0),S2(0);</TT>
<BR><TT>Vars: XAlpha(2/(Length+1)),XBeta(1-Xalpha),XAvgS12(C);</TT><TT></TT>
<P><TT>Pivot = ((O+H+L+C)*.25);</TT>
<BR><TT>R1 = (2*Pivot)-L;</TT>
<BR><TT>S1 = (2*Pivot)-H;</TT>
<BR><TT>{R2 = Pivot-(S1-R1);}</TT>
<BR><TT>S2 = Pivot-(R1-S1);</TT><TT></TT>
<P><TT>XAvgS12=XAvgS12*XBeta+(S1+S2)*.5*XAlpha;</TT><TT></TT>
<P><TT>LeePivotS12Average=XAvgS12;</TT>
<BR><TT></TT>
<BR><TT></TT> <TT></TT>
<P><TT>CODE FOR SYSTEM FOLLOWS:- - - - - - - - - - - - - - - - - -</TT><TT></TT>
<P><TT>{</TT>
<BR><TT> System LeePivotMOVA</TT><TT></TT>
<P><TT> Trading system written by:</TT>
<BR><TT> Clyde Lee (FuturesMagic) Copyright (c) 1997</TT>
<BR><TT> clydelee@xxxxxxx</TT><TT></TT>
<P><TT> System LeePivotMOVA - System counts how many times in the
past</TT>
<BR><TT> NBar2Cnt bars (including current one) that High price has
been</TT>
<BR><TT> above the XAverage of length LengH of the average of the
R1 AND R2</TT>
<BR><TT> (resistance levels computed by pivot computation).
Time periods of</TT>
<BR><TT> 7 to 10 bars seem to work pretty good.</TT><TT></TT>
<P><TT> System also counts how many times in this same period the
Low price</TT>
<BR><TT> has been below the XAverage of length LengL of the average
of the</TT>
<BR><TT> S1 AND S2 (support levels computed by pivot computation).</TT><TT></TT>
<P><TT> When the number of high counts minus the low counts exceedes</TT>
<BR><TT> or is equal to the value CntDiff then the system attempts
to</TT>
<BR><TT> buy the next day at the average of the R12 AND S12 average</TT>
<BR><TT> values. To sell the low count must have the same difference</TT>
<BR><TT> over the high count. A difference of 2 or 3 or 4 seems
to be</TT>
<BR><TT> ideal for most vehicles.</TT><TT></TT>
<P><TT> An enddate of 999999 will cause system to close all positions</TT>
<BR><TT> on last bar of file. Don't set to this if running real
life!!!</TT><TT></TT>
<P><TT>$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$</TT>
<BR><TT>}</TT><TT></TT>
<P><TT>inputs: LengH(7),
{Length for Resistance XAverage}</TT>
<BR><TT>
LengL(10), {Length for Support
XAverage}</TT>
<BR><TT>
NBar2Cnt(10), {Number of bars to use in over/under count}</TT>
<BR><TT>
CntDiff(3), {Difference in over resistance and</TT>
<BR><TT>
under support for a good trade}</TT>
<BR><TT>
BegDate(650101),EndDate(991231);</TT><TT></TT>
<P><TT>Vars: UPCnt(0),DNCnt(0),RawCnt(0);</TT>
<BR><TT>Vars: TPHigh(0),TPLow(0);</TT>
<BR><TT></TT> <TT></TT>
<P><TT> TPHigh=LeePivotR12Average(LengH);</TT>
<BR><TT> TPLow =LeePivotS12Average(LengL);</TT>
<BR><TT> If TPLow>TPHigh then TPLow=LeePivotS12Average(LengH);</TT>
<BR><TT> RawCnt=RawCnt+1;</TT><TT></TT>
<P><TT>If Date>=BegDate and Date<EndDate and RawCnt>15 then begin</TT><TT></TT>
<P><TT> Value2=(TPHigh+TPLow)*.5;</TT>
<BR><TT> ExitLong TPLOw stop;</TT>
<BR><TT> ExitShort TPHIgh stop;</TT><TT></TT>
<P><TT> UPCnt=0;DNCnt=0;</TT>
<BR><TT> For Value1=0 to NBar2Cnt-1 Begin</TT>
<BR><TT> If L[Value1]<=TPLow[Value1] then DNCnt=DNCnt+1;</TT>
<BR><TT> If H[Value1]>=TPHigh[Value1] then UPCnt=UPCnt+1;</TT>
<BR><TT> End;</TT>
<BR><TT> </TT>
<BR><TT> Value3=UPCnt-DNCnt;</TT>
<BR><TT> If Value3>=+CntDiff then buy ("TPLong") at Value2
stop;</TT>
<BR><TT> If Value3<=-CntDiff then sell ("TPShort") at Value2 stop;</TT><TT></TT>
<P><TT>End;</TT><TT></TT>
<P><TT>If (LastBarOnChart=True and EndDate=999999) or Date>=EndDate
then begin</TT>
<BR><TT> If marketposition = 1 then exitlong {("exl") at Market};</TT>
<BR><TT> If marketposition = -1 then exitshort{("exs") at Market};</TT>
<BR><TT>End;</TT>
<BR><TT></TT> <TT></TT>
<P><TT>END OF CODE FOR SYSTEM</TT>
<BR><TT></TT>
<BR><TT></TT>
<BR> </HTML>
</x-html>
Attachment Converted: "c:\eudora\attach\Leepivot.ela"
Attachment Converted: "c:\eudora\attach\vcard69.vcf"
|