PureBytes Links
Trading Reference Links
|
<x-html><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4030.2400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face="Courier New" size=2>I wanted to gather some statistics on RUNS
and wrote a</FONT></DIV>
<DIV><FONT face="Courier New" size=2>simple indicator to plot up and down runs
and to accumulate</FONT></DIV>
<DIV><FONT face="Courier New" size=2>statistics about number of runs from 1 to 7
bars in length.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Kind of interesting, just started looking
at this and thought</FONT></DIV>
<DIV><FONT face="Courier New" size=2>someone else might be
interested.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>The following is an output from a 30 minute
DJ data set which</FONT></DIV>
<DIV><FONT face="Courier New" size=2>was loaded as 60 minute bars.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>After that is the code and attached is
an .ela for anyone</FONT></DIV>
<DIV><FONT face="Courier New" size=2>interested.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Why not post some of your observations if
you use this.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Clyde</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2> <BR>Data for: INDU-30.CSV
Period 970411/1000425 Delta=1
@60<BR> <BR>Up1= 560.00 Up2=
265.00 Up3= 148.00<BR>Dn1=
589.00 Dn2= 259.00 Dn3=
142.00<BR> <BR>Up4= 68.00
Up5= 32.00 Up6=
19.00 Up7=
7.00<BR>Dn4= 72.00 Dn5=
26.00 Dn6= 19.00
Dn7= 11.00<BR> <BR>Percent
Up5/4= 0.47 Percent
Up6/4= 0.28 Percent
Up7/4= 0.10<BR>Percent
Dn5/4= 0.36 Percent
Dn6/4= 0.26 Percent
Dn7/4=
0.15<BR> <BR>Up4barX1Pr= 2.16
Up4barX2Pr= 16.09
Up4barX3Pr= 15.50<BR>Up5barX1Pr=
14.00 Up5barX2Pr= 21.66
Up5barX3Pr=
39.00<BR>Up6barX1Pr= 9.37
Up6barX2Pr= 47.21
Up6barX3Pr= 33.05<BR>Up7barX1Pr=
79.57 Up7barX2Pr= 59.00
Up7barX3Pr=
101.29<BR> <BR>Dn4barX1Pr= 8.51
Dn4barX2Pr= 10.22
Dn4barX3Pr=
7.74<BR>Dn5barX1Pr= 3.46
Dn5barX2Pr= 14.62
Dn5barX3Pr=
32.81<BR>Dn6barX1Pr= 4.37
Dn6barX2Pr= 4.16
Dn6barX3Pr=
6.26<BR>Dn7barX1Pr= 13.55
Dn7barX2Pr= 23.36
Dn7barX3Pr= -3.45<BR> <BR> <BR></DIV></FONT>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>{ Indicator:
C_Lee_CountUp-Down</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2> Look back a given number of
bars and deterine direction of<BR> close with respect to that
prior bar. Count all up and down<BR> events and log all the
only 1, only 2, only3, ..... counts.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2> Also look at price movements
after 4,5,6,7 counts.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>}</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><BR><FONT face="Courier New" size=2>Input:
BarsBack(2), {Number bars to look back
to determine direction}<BR>
PrntStat(True); {Set true to print statistics to print
log }</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Vars:
UpCount(0),DnCount(0);</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Vars:
UpCount1(0),UpCount2(0),UpCount3(0);<BR>Vars:
DnCount1(0),DnCount2(0),DnCount3(0);</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Vars:
UpCount4(0),UpCount5(0),UpCount6(0),UpCount7(0);<BR>Vars:
DnCount4(0),DnCount5(0),DnCount6(0),DnCount7(0);</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Vars:
UpDeltP41(0),UpDeltP42(0),UpDeltP43(0);<BR>Vars:
UpDeltP51(0),UpDeltP52(0),UpDeltP53(0);<BR>Vars:
UpDeltP61(0),UpDeltP62(0),UpDeltP63(0);<BR>Vars:
UpDeltP71(0),UpDeltP72(0),UpDeltP73(0);</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Vars:
DnDeltP41(0),DnDeltP42(0),DnDeltP43(0);<BR>Vars:
DnDeltP51(0),DnDeltP52(0),DnDeltP53(0);<BR>Vars:
DnDeltP61(0),DnDeltP62(0),DnDeltP63(0);<BR>Vars:
DnDeltP71(0),DnDeltP72(0),DnDeltP73(0);</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Vars:
FirstDate(0),LastDate(0);</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><BR><FONT face="Courier New" size=2>LastDate=Date;<BR>If FirstDate=0 then
FirstDate=Date;</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>If C>C[BarsBack] then
begin<BR> UpCount=UpCount+1;<BR> DnCount=0;<BR> If DnCount[1]=1
then DnCount1=DnCount1+1;<BR> If DnCount[1]=2 then
DnCount2=DnCount2+1;<BR> If DnCount[1]=3 then
DnCount3=DnCount3+1;<BR> If DnCount[1]=4 then
UpCount4=UpCount4+1;<BR> If DnCount[1]=5 then
UpCount5=UpCount5+1;<BR> If DnCount[1]=6 then
UpCount6=UpCount6+1;<BR> If DnCount[1]=7 then
UpCount7=UpCount7+1;<BR>End;</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>If C<C[BarsBack] then
begin<BR> DnCount=DnCount+1;<BR> UpCount=0;<BR> If UpCount[1]=1
then UpCount1=UpCount1+1;<BR> If UpCount[1]=2 then
UpCount2=UpCount2+1;<BR> If UpCount[1]=3 then
UpCount3=UpCount3+1;<BR> If UpCount[1]=4 then
DnCount4=DnCount4+1;<BR> If UpCount[1]=5 then
DnCount5=DnCount5+1;<BR> If UpCount[1]=6 then
DnCount6=DnCount6+1;<BR> If UpCount[1]=7 then
DnCount7=DnCount7+1;<BR>End;</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>If UpCount[1]=4 then
UpDeltP41=UpDeltP41+(c-c[1]); <BR>If UpCount[2]=4 then
UpDeltP42=UpDeltP42+(c-c[2]); <BR>If UpCount[3]=4 then
UpDeltP43=UpDeltP43+(c-c[3]); </FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>If UpCount[1]=5 then
UpDeltP51=UpDeltP51+(c-c[1]); <BR>If UpCount[2]=5 then
UpDeltP52=UpDeltP52+(c-c[2]); <BR>If UpCount[3]=5 then
UpDeltP53=UpDeltP53+(c-c[3]); </FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>If UpCount[1]=6 then
UpDeltP61=UpDeltP61+(c-c[1]); <BR>If UpCount[2]=6 then
UpDeltP62=UpDeltP62+(c-c[2]); <BR>If UpCount[3]=6 then
UpDeltP63=UpDeltP63+(c-c[3]); </FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>If UpCount[1]=7 then
UpDeltP71=UpDeltP71+(c-c[1]); <BR>If UpCount[2]=7 then
UpDeltP72=UpDeltP72+(c-c[2]); <BR>If UpCount[3]=7 then
UpDeltP73=UpDeltP73+(c-c[3]); </FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><BR><FONT face="Courier New" size=2>If DnCount[1]=4 then
DnDeltP41=DnDeltP41+(c-c[1]); <BR>If DnCount[2]=4 then
DnDeltP42=DnDeltP42+(c-c[2]); <BR>If DnCount[3]=4 then
DnDeltP43=DnDeltP43+(c-c[3]); </FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>If DnCount[1]=5 then
DnDeltP51=DnDeltP51+(c-c[1]); <BR>If DnCount[2]=5 then
DnDeltP52=DnDeltP52+(c-c[2]); <BR>If DnCount[3]=5 then
DnDeltP53=DnDeltP53+(c-c[3]); </FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>If DnCount[1]=6 then
DnDeltP61=DnDeltP61+(c-c[1]); <BR>If DnCount[2]=6 then
DnDeltP62=DnDeltP62+(c-c[2]); <BR>If DnCount[3]=6 then
DnDeltP63=DnDeltP63+(c-c[3]); </FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>If DnCount[1]=7 then
DnDeltP71=DnDeltP71+(c-c[1]); <BR>If DnCount[2]=7 then
DnDeltP72=DnDeltP72+(c-c[2]); <BR>If DnCount[3]=7 then
DnDeltP73=DnDeltP73+(c-c[3]); </FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><BR><FONT face="Courier New" size=2>If CurrentBar>BarsBack then
begin<BR> Plot1(
UpCount,"U");<BR> Plot2(-DnCount,"D");<BR>End;</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>If LastBarOnChart and PrntStat then
begin<BR> Print(" ");<BR> Print(" ");<BR> Print("Data for:
",GetSymbolName," Period
",NumToStr(FirstDate,0),"/",NumToStr(LastDate,0),<BR>
" Delta=",NumToStr(BarsBack,0),"
@",NumToStr(BarInterval,0));<BR> Print("
");<BR> Print("Up1=",UpCount1," Up2=",UpCount2,"
Up3=",UpCount3);<BR> Print("Dn1=",DnCount1," Dn2=",DnCount2,"
Dn3=",DnCount3);<BR> Print(" ");<BR> Print("Up4=",UpCount4,"
Up5=",UpCount5," Up6=",UpCount6,"
Up7=",UpCount7);<BR> Print("Dn4=",DnCount4," Dn5=",DnCount5,"
Dn6=",DnCount6," Dn7=",DnCount7);<BR> Print("
");<BR> Print("Percent Up5/4=",UpCount5/UpCount4," Percent
Up6/4=",UpCount6/UpCount4,<BR> " Percent
Up7/4=",UpCount7/UpCount4);<BR> Print("Percent
Dn5/4=",DnCount5/DnCount4," Percent
Dn6/4=",DnCount6/DnCount4,<BR> " Percent
Dn7/4=",DnCount7/DnCount4);<BR> Print("
");<BR> Print("Up4barX1Pr=",UpDeltP41/UpCount4,"
Up4barX2Pr=",UpDeltP42/UpCount4,"
Up4barX3Pr=",UpDeltP43/UpCount4);<BR> Print("Up5barX1Pr=",UpDeltP51/UpCount5,"
Up5barX2Pr=",UpDeltP52/UpCount5,"
Up5barX3Pr=",UpDeltP53/UpCount5);<BR> Print("Up6barX1Pr=",UpDeltP61/UpCount6,"
Up6barX2Pr=",UpDeltP62/UpCount6,"
Up6barX3Pr=",UpDeltP63/UpCount6);<BR> Print("Up7barX1Pr=",UpDeltP71/UpCount7,"
Up7barX2Pr=",UpDeltP72/UpCount7,"
Up7barX3Pr=",UpDeltP73/UpCount7);<BR> Print("
");<BR> Print("Dn4barX1Pr=",DnDeltP41/DnCount4,"
Dn4barX2Pr=",DnDeltP42/DnCount4,"
Dn4barX3Pr=",DnDeltP43/DnCount4);<BR> Print("Dn5barX1Pr=",DnDeltP51/DnCount5,"
Dn5barX2Pr=",DnDeltP52/DnCount5,"
Dn5barX3Pr=",DnDeltP53/DnCount5);<BR> Print("Dn6barX1Pr=",DnDeltP61/DnCount6,"
Dn6barX2Pr=",DnDeltP62/DnCount6,"
Dn6barX3Pr=",DnDeltP63/DnCount6);<BR> Print("Dn7barX1Pr=",DnDeltP71/DnCount7,"
Dn7barX2Pr=",DnDeltP72/DnCount7,"
Dn7barX3Pr=",DnDeltP73/DnCount7);<BR> Print(" ");<BR> Print("
");</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><BR><FONT face="Courier New" size=2>End;</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2></FONT><FONT face="Courier New"
size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>- - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -<BR>Clyde Lee
Chairman/CEO (Home of
SwingMachine)<BR>SYTECH
Corporation
email: <</FONT><A href="mailto:clydelee@xxxxxxx"><FONT
face="Courier New" size=2>clydelee@xxxxxxx</FONT></A><FONT face="Courier New"
size=2>> <BR>7910 Westglen, Suite 105
Work: (713) 783-9540<BR>Houston, TX
77063
Fax: (713) 783-1092 <BR>- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -<BR>- - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -<BR>To subscribe / unsubscribe from SwingMachine
list<BR></FONT><A href="http://www.egroups.com/list/swingmachine/"><FONT
face="Courier New"
size=2>http://www.egroups.com/list/swingmachine/</FONT></A></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>After joining list the freeware
SwingMachine program <BR>(DOS Version) is available in the VAULT
at:<BR></FONT><A href="http://www.egroups.com/list/swingmachine/"><FONT
face="Courier New"
size=2>http://www.egroups.com/list/swingmachine/</FONT></A><BR><FONT
face="Courier New" size=2>- - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -<BR></FONT></DIV></BODY></HTML>
</x-html>
Attachment Converted: "f:\eudora\attach\CL_CNTUD.ELA"
|