PureBytes Links
Trading Reference Links
|
Explore for the n=1 last quotation.
For N100 stocks, the ,"HIGHEST DEMA D-ratio" varies from 23 to 95 and the
"LOWEST DEMA D-ratio" from 2 to 10.
C. Applications
The D-ratio or its smoothed form may give interesting trading systems.
Search various low levels for the Sell level D1 and various high levels forthe Buy Level D2.
You may search the optimal D1, D2 following the optimization
/*D-ratio optimized trading system*/
R=500*(H-L)/(H+L);
Z=Optimize("Z",20,5,20,5);
RRR=DEMA(R,Z);
Rmin=LastValue(Lowest(R));RminF=floor(LastValue(Lowest(R)))+1;
Rmax=LastValue(Highest(R));RmaxC=ceil(LastValue(Highest(R)))-1;
RRRmin=LastValue(Lowest(RRR));RRRminF=floor(LastValue(Lowest(RRR)))+1;
RRRmax=LastValue(Highest(RRR));RRRmaxC=ceil(LastValue(Highest(RRR)))-1;
Filter=1;
AddColumn(R,"D-ratio");
AddColumn(RRR,"DEMA D-ratio");
AddColumn(Rmax,"HIGHEST D-ratio");
AddColumn(Rmin,"LOWEST D-ratio");
AddColumn(RRRmax,"HIGHEST DEMA D-ratio");
AddColumn(RRRmin,"LOWEST DEMA D-ratio");
AddColumn(RRRmaxC,"HIGHEST DEMA D-ratio C");
AddColumn(RRRminF,"LOWEST DEMA D-ratio F");
D1=Optimize("D1",13,RRRminF,RRRminF+0.5*(RRRmaxC-RRRminF),1);
D2=Optimize("D2",17,RRRminF+0.5*(RRRmaxC-RRRminF),RRRmaxC,1);
F1=RRR>=D2;F2=RRR<=D1;
Sell=F2;Buy=F1;
Buy=ExRem(Buy,Sell);Sell=ExRem(Sell,Buy);
Short=Sell;Cover=Buy;
Short=ExRem(Short,Cover);Cover=ExRem(Cover,Short);
For your indicator builder use the
/*D-ratio graph*/
R=500*(H-L)/(H+L);
Z=Optimize("Z",20,5,20,5);
RRR=DEMA(R,Z);
Rmin=LastValue(Lowest(R));RminF=floor(LastValue(Lowest(R)))+1;
Rmax=LastValue(Highest(R));RmaxC=ceil(LastValue(Highest(R)))-1;
RRRmin=LastValue(Lowest(RRR));RRRminF=floor(LastValue(Lowest(RRR)))+1;
RRRmax=LastValue(Highest(RRR));RRRmaxC=ceil(LastValue(Highest(RRR)))-1;
D1=Optimize("D1",13,RRRminF,RRRminF+0.5*(RRRmaxC-RRRminF),1);
D2=Optimize("D2",17,RRRminF+0.5*(RRRmaxC-RRRminF),RRRmaxC,1);
F1=RRR>=D2;F2=RRR<=D1;
Sell=F2;Buy=F1;
Buy=ExRem(Buy,Sell);Sell=ExRem(Sell,Buy);
Short=Sell;Cover=Buy;
Short=ExRem(Short,Cover);Cover=ExRem(Cover,Short);
Plot(R,"D-ratio",1,1);Plot(RRR,"DEMA D-ratio",7,8);
Plot(D2,"Buy Level",5,1);Plot(D1,"Sell Level",4,1);
Do not forget to replace above default values for Z, D1, D2 with your optimization results.
In general, when the DEMA(D-ratio) is below the red line the stock is Sell [or Short] and
above the green line it is Buy [or Cover]
You may see INTC example in the att. gif.
[for [Z=5, D1=13, D2=17] the % Net profit exceeds +800% from Jan 2000]
------=_NextPart_001_001E_01C21B76.DC2B20A0
Content-Type: text/html;
charset="iso-8859-7"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-7" http-equiv=Content-Type>
<META content="MSHTML 5.00.3013.2600" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2><EM><U>A. Definition</U></EM></FONT></DIV>
<DIV><FONT size=2>The D-ratio is defined as</FONT></DIV>
<DIV><FONT size=2>D-ratio = 500*(H-L)/(H+L)</FONT></DIV>
<DIV><FONT size=2>To avoid sudden spikes but keep the line properties, itis
useful to consider a fast moving average like </FONT></DIV>
<DIV><FONT size=2>DEMA(D-ratio,5), which usually oscillates in the [0,100]
region.</FONT></DIV>
<DIV><FONT size=2>Slightly negative values or values above 100 may appear, but
not frequently.</FONT></DIV>
<DIV><FONT size=2><EM><U>B. Range</U></EM></FONT></DIV>
<DIV><FONT size=2>The range of D-ratio and its DEMA comes from the
Exploration</FONT></DIV>
<DIV><FONT size=2>/*D-ratio range*/</FONT></DIV>
<DIV><FONT
size=2>R=500*(H-L)/(H+L);<BR>Z=5;<BR>RRR=DEMA(R,Z);<BR>Rmin=LastValue(Lowest(R));RminF=floor(LastValue(Lowest(R)))+1;<BR>Rmax=LastValue(Highest(R));RmaxC=ceil(LastValue(Highest(R)))-1;<BR>RRRmin=LastValue(Lowest(RRR));RRRminF=floor(LastValue(Lowest(RRR)))+1;<BR>RRRmax=LastValue(Highest(RRR));RRRmaxC=ceil(LastValue(Highest(RRR)))-1;<BR>Filter=1;<BR>AddColumn(R,"D-ratio");<BR>AddColumn(RRR,"DEMA
D-ratio");<BR>AddColumn(Rmax,"HIGHEST D-ratio");<BR>AddColumn(Rmin,"LOWEST
D-ratio");<BR>AddColumn(RRRmax,"HIGHEST DEMA
D-ratio");<BR>AddColumn(RRRmin,"LOWEST DEMA D-ratio");</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Explore for the n=1 last quotation.<BR></FONT><FONT size=2>For
N100 stocks, the ,"HIGHEST DEMA D-ratio" varies from 23 to 95 and the
</FONT></DIV>
<DIV><FONT size=2>"LOWEST DEMA D-ratio" from 2 to 10.</FONT></DIV>
<DIV><FONT size=2><U><EM>C. Applications</EM></U></FONT></DIV>
<DIV><FONT size=2>The D-ratio or its smoothed form may give interesting trading
systems.</FONT></DIV>
<DIV><FONT size=2>Search various low levels for the Sell level D1 and various
high levels for the Buy Level D2.</FONT></DIV>
<DIV><FONT size=2>You may search the optimal D1, D2 following the
optimization</FONT></DIV>
<DIV><FONT size=2>/*D-ratio optimized trading system*/</FONT><FONT size=2><FONT
face=Verdana size=2></DIV><FONT face="Times New Roman">
<DIV>R=</FONT><FONT size=2>500</FONT></FONT><FONT face=Verdana size=2><FONT
face="Times New Roman">*(H-L)/(H+L);</FONT></DIV><FONT face="Times New Roman">
<DIV>Z=</FONT><FONT size=2>Optimize</FONT></FONT><FONT size=2>(</FONT><FONT
size=2>"Z"</FONT><FONT size=2>,</FONT><FONT size=2>20</FONT><FONT
size=2>,</FONT><FONT size=2>5</FONT><FONT size=2>,</FONT><FONT
size=2>20</FONT><FONT size=2>,</FONT><FONT size=2>5</FONT><FONT face=Verdana
size=2><FONT face="Times New Roman">);</FONT></DIV><FONT face="Times New Roman">
<DIV>RRR=</FONT><FONT size=2>DEMA</FONT></FONT><FONT face=Verdana size=2><FONT
face="Times New Roman">(R,Z);</FONT></DIV><FONT face="Times New Roman">
<DIV>Rmin=</FONT><FONT size=2>LastValue</FONT></FONT><FONT size=2>(</FONT><FONT
size=2>Lowest</FONT><FONT size=2>(R));RminF=</FONT><FONT
size=2>floor</FONT><FONT size=2>(</FONT><FONT size=2>LastValue</FONT><FONT
size=2>(</FONT><FONT size=2>Lowest</FONT><FONT size=2>(R)))+</FONT><FONT
size=2>1</FONT><FONT face=Verdana size=2><FONT
face="Times New Roman">;</FONT></DIV><FONT face="Times New Roman">
<DIV>Rmax=</FONT><FONT size=2>LastValue</FONT></FONT><FONT size=2>(</FONT><FONT
size=2>Highest</FONT><FONT size=2>(R));RmaxC=</FONT><FONT
size=2>ceil</FONT><FONT size=2>(</FONT><FONT size=2>LastValue</FONT><FONT
size=2>(</FONT><FONT size=2>Highest</FONT><FONT size=2>(R)))-</FONT><FONT
size=2>1</FONT><FONT face=Verdana size=2><FONT
face="Times New Roman">;</FONT></DIV><FONT face="Times New Roman">
<DIV>RRRmin=</FONT><FONT size=2>LastValue</FONT></FONT><FONT
size=2>(</FONT><FONT size=2>Lowest</FONT><FONT
size=2>(RRR));RRRminF=</FONT><FONT size=2>floor</FONT><FONT size=2>(</FONT><FONT
size=2>LastValue</FONT><FONT size=2>(</FONT><FONT size=2>Lowest</FONT><FONT
size=2>(RRR)))+</FONT><FONT size=2>1</FONT><FONT face=Verdana size=2><FONT
face="Times New Roman">;</FONT></DIV><FONT face="Times New Roman">
<DIV>RRRmax=</FONT><FONT size=2>LastValue</FONT></FONT><FONT
size=2>(</FONT><FONT size=2>Highest</FONT><FONT
size=2>(RRR));RRRmaxC=</FONT><FONT size=2>ceil</FONT><FONT size=2>(</FONT><FONT
size=2>LastValue</FONT><FONT size=2>(</FONT><FONT size=2>Highest</FONT><FONT
size=2>(RRR)))-</FONT><FONT size=2>1</FONT><FONT face=Verdana size=2><FONT
face="Times New Roman">;</FONT></DIV><FONT face="Times New Roman">
<DIV>Filter=</FONT><FONT size=2>1</FONT><FONT face=Verdana size=2></FONT><FONT
face="Times New Roman">;</FONT></FONT><FONT face=Verdana size=2></DIV><FONT
face="Times New Roman">
<DIV>AddColumn</FONT><FONT size=2>(R,</FONT><FONT size=2>"D-ratio"</FONT><FONT
face=Verdana size=2></FONT><FONT face="Times New Roman">);</FONT></FONT><FONT
face=Verdana size=2></DIV><FONT face="Times New Roman">
<DIV>AddColumn</FONT><FONT size=2>(RRR,</FONT><FONT size=2>"DEMA
D-ratio"</FONT><FONT face=Verdana size=2></FONT><FONT
face="Times New Roman">);</FONT></FONT><FONT face=Verdana size=2></DIV><FONT
face="Times New Roman">
<DIV>AddColumn</FONT><FONT size=2>(Rmax,</FONT><FONT size=2>"HIGHEST
D-ratio"</FONT><FONT face=Verdana size=2></FONT><FONT
face="Times New Roman">);</FONT></FONT><FONT face=Verdana size=2></DIV><FONT
face="Times New Roman">
<DIV>AddColumn</FONT><FONT size=2>(Rmin,</FONT><FONT size=2>"LOWEST
D-ratio"</FONT><FONT face=Verdana size=2></FONT><FONT
face="Times New Roman">);</FONT></FONT><FONT face=Verdana size=2></DIV><FONT
face="Times New Roman">
<DIV>AddColumn</FONT><FONT size=2>(RRRmax,</FONT><FONT size=2>"HIGHEST DEMA
D-ratio"</FONT><FONT face=Verdana size=2></FONT><FONT
face="Times New Roman">);</FONT></FONT><FONT face=Verdana size=2></DIV><FONT
face="Times New Roman">
<DIV>AddColumn</FONT><FONT size=2>(RRRmin,</FONT><FONT size=2>"LOWEST DEMA
D-ratio"</FONT><FONT face=Verdana size=2></FONT><FONT
face="Times New Roman">);</FONT></FONT><FONT face=Verdana size=2></DIV><FONT
face="Times New Roman">
<DIV>AddColumn</FONT><FONT size=2>(RRRmaxC,</FONT><FONT size=2>"HIGHESTDEMA
D-ratio C"</FONT><FONT face=Verdana size=2></FONT><FONT
face="Times New Roman">);</FONT></DIV></FONT><FONT face=Verdana size=2><FONT
face="Times New Roman">
<DIV>AddColumn</FONT><FONT size=2>(RRRminF,</FONT><FONT size=2>"LOWEST DEMA
D-ratio F"</FONT></FONT><FONT face=Verdana size=2><FONT
face="Times New Roman">);</FONT></DIV><FONT face="Times New Roman">
<DIV>D1=</FONT><FONT size=2>Optimize</FONT></FONT><FONT size=2>(</FONT><FONT
size=2>"D1"</FONT><FONT size=2>,</FONT><FONT size=2>13</FONT><FONT
size=2>,RRRminF,RRRminF+</FONT><FONT size=2>0.5</FONT><FONT
size=2>*(RRRmaxC-RRRminF),</FONT><FONT size=2>1</FONT><FONT face=Verdana
size=2><FONT face="Times New Roman">);</FONT></DIV><FONT face="Times New Roman">
<DIV>D2=</FONT><FONT size=2>Optimize</FONT></FONT><FONT size=2>(</FONT><FONT
size=2>"D2"</FONT><FONT size=2>,</FONT><FONT size=2>17</FONT><FONT
size=2>,RRRminF+</FONT><FONT size=2>0.5</FONT><FONT
size=2>*(RRRmaxC-RRRminF),RRRmaxC,</FONT><FONT size=2>1</FONT><FONT face=Verdana
size=2><FONT face="Times New Roman">);</FONT></DIV>
<DIV><FONT face="Times New Roman">F1=RRR>=D2;F2=RRR<=D1;</FONT></DIV>
<DIV><FONT face="Times New Roman">Sell=F2;Buy=F1;</FONT></DIV><FONT
face="Times New Roman">
<DIV>Buy=</FONT><FONT size=2>ExRem</FONT></FONT><FONT
size=2>(Buy,Sell);Sell=</FONT><FONT size=2>ExRem</FONT><FONT face=Verdana
size=2><FONT face="Times New Roman">(Sell,Buy);</FONT></DIV>
<DIV><FONT face="Times New Roman">Short=Sell;Cover=Buy;</FONT></DIV><FONT
face="Times New Roman">
<DIV>Short=</FONT><FONT size=2>ExRem</FONT></FONT><FONT
size=2>(Short,Cover);Cover=</FONT><FONT size=2>ExRem</FONT><FONT face=Verdana
size=2><FONT face="Times New Roman">(Cover,Short);</FONT></DIV>
<DIV> </DIV><FONT face="Times New Roman">
<DIV>For your indicator builder use the </DIV>
<DIV>/*D-ratio graph*/</DIV>
<DIV></FONT><FONT face=Verdana size=2> </DIV><FONT face="Times New Roman">
<DIV>R=</FONT><FONT size=2>500</FONT></FONT><FONT face=Verdana size=2><FONT
face="Times New Roman">*(H-L)/(H+L);</FONT></DIV><FONT face="Times New Roman">
<DIV>Z=</FONT><FONT face=Verdana size=2></FONT><FONT
face="Times New Roman">Optimize("Z",20,5,20,5);</FONT></FONT><FONT face=Verdana
size=2></DIV><FONT face="Times New Roman">
<DIV>RRR=</FONT><FONT size=2>DEMA</FONT></FONT><FONT face=Verdana size=2><FONT
face="Times New Roman">(R,Z);</FONT></DIV><FONT face="Times New Roman">
<DIV>Rmin=</FONT><FONT size=2>LastValue</FONT></FONT><FONT size=2>(</FONT><FONT
size=2>Lowest</FONT><FONT size=2>(R));RminF=</FONT><FONT
size=2>floor</FONT><FONT size=2>(</FONT><FONT size=2>LastValue</FONT><FONT
size=2>(</FONT><FONT size=2>Lowest</FONT><FONT size=2>(R)))+</FONT><FONT
size=2>1</FONT><FONT face=Verdana size=2><FONT
face="Times New Roman">;</FONT></DIV><FONT face="Times New Roman">
<DIV>Rmax=</FONT><FONT size=2>LastValue</FONT></FONT><FONT size=2>(</FONT><FONT
size=2>Highest</FONT><FONT size=2>(R));RmaxC=</FONT><FONT
size=2>ceil</FONT><FONT size=2>(</FONT><FONT size=2>LastValue</FONT><FONT
size=2>(</FONT><FONT size=2>Highest</FONT><FONT size=2>(R)))-</FONT><FONT
size=2>1</FONT><FONT face=Verdana size=2><FONT
face="Times New Roman">;</FONT></DIV><FONT face="Times New Roman">
<DIV>RRRmin=</FONT><FONT size=2>LastValue</FONT></FONT><FONT
size=2>(</FONT><FONT size=2>Lowest</FONT><FONT
size=2>(RRR));RRRminF=</FONT><FONT size=2>floor</FONT><FONT size=2>(</FONT><FONT
size=2>LastValue</FONT><FONT size=2>(</FONT><FONT size=2>Lowest</FONT><FONT
size=2>(RRR)))+</FONT><FONT size=2>1</FONT><FONT face=Verdana size=2><FONT
face="Times New Roman">;</FONT></DIV><FONT face="Times New Roman">
<DIV>RRRmax=</FONT><FONT size=2>LastValue</FONT></FONT><FONT
size=2>(</FONT><FONT size=2>Highest</FONT><FONT
size=2>(RRR));RRRmaxC=</FONT><FONT size=2>ceil</FONT><FONT size=2>(</FONT><FONT
size=2>LastValue</FONT><FONT size=2>(</FONT><FONT size=2>Highest</FONT><FONT
size=2>(RRR)))-</FONT><FONT size=2>1</FONT><FONT face=Verdana size=2><FONT
face="Times New Roman">;</FONT></FONT><FONT face=Verdana size=2></DIV><FONT
face="Times New Roman">
<DIV>D1=</FONT><FONT size=2>Optimize</FONT></FONT><FONT size=2>(</FONT><FONT
size=2>"D1"</FONT><FONT size=2>,</FONT><FONT size=2>13</FONT><FONT
size=2>,RRRminF,RRRminF+</FONT><FONT size=2>0.5</FONT><FONT
size=2>*(RRRmaxC-RRRminF),</FONT><FONT size=2>1</FONT><FONT face=Verdana
size=2><FONT face="Times New Roman">);</FONT></DIV><FONT face="Times New Roman">
<DIV>D2=</FONT><FONT size=2>Optimize</FONT></FONT><FONT size=2>(</FONT><FONT
size=2>"D2"</FONT><FONT size=2>,</FONT><FONT size=2>17</FONT><FONT
size=2>,RRRminF+</FONT><FONT size=2>0.5</FONT><FONT
size=2>*(RRRmaxC-RRRminF),RRRmaxC,</FONT><FONT size=2>1</FONT><FONT face=Verdana
size=2><FONT face="Times New Roman">);</FONT></DIV>
<DIV><FONT face="Times New Roman">F1=RRR>=D2;F2=RRR<=D1;</FONT></DIV>
<DIV><FONT face="Times New Roman">Sell=F2;Buy=F1;</FONT></DIV><FONT
face="Times New Roman">
<DIV>Buy=</FONT><FONT size=2>ExRem</FONT></FONT><FONT
size=2>(Buy,Sell);Sell=</FONT><FONT size=2>ExRem</FONT><FONT face=Verdana
size=2><FONT face="Times New Roman">(Sell,Buy);</FONT></DIV>
<DIV><FONT face="Times New Roman">Short=Sell;Cover=Buy;</FONT></DIV><FONT
face="Times New Roman">
<DIV>Short=</FONT><FONT size=2>ExRem</FONT></FONT><FONT
size=2>(Short,Cover);Cover=</FONT><FONT size=2>ExRem</FONT><FONT face=Verdana
size=2><FONT face="Times New Roman">(Cover,Short);</FONT></FONT><FONT
face=Verdana size=2></DIV><FONT face="Times New Roman">
<DIV>Plot</FONT><FONT size=2>(R,</FONT><FONT size=2>"D-ratio"</FONT><FONT
size=2>,</FONT><FONT size=2>1</FONT><FONT size=2>,</FONT><FONT
size=2>1</FONT><FONT size=2>);</FONT><FONT size=2>Plot</FONT><FONT
size=2>(RRR,</FONT><FONT size=2>"DEMA D-ratio"</FONT><FONT size=2>,</FONT><FONT
size=2>7</FONT><FONT size=2>,</FONT><FONT size=2>8</FONT><FONT face=Verdana
size=2></FONT><FONT face="Times New Roman">);</FONT></DIV></FONT><FONT
face=Verdana size=2><FONT face="Times New Roman">
<DIV>Plot</FONT><FONT size=2>(D2,</FONT><FONT size=2>"Buy Level"</FONT><FONT
size=2>,</FONT><FONT size=2>5</FONT><FONT size=2>,</FONT><FONT
size=2>1</FONT><FONT size=2>);</FONT><FONT size=2>Plot</FONT></FONT><FONT
size=2>(D1,</FONT><FONT size=2>"Sell Level"</FONT><FONT size=2>,</FONT><FONT
size=2>4</FONT><FONT size=2>,</FONT><FONT size=2>1</FONT><FONT face=Verdana
size=2><FONT face="Times New Roman">);</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2><FONT face="Times New Roman">Do not forget to
replace above default values for Z, D1, D2 with your optimization
results.</FONT></FONT></DIV>
<DIV><EM><FONT face=Verdana size=2><FONT face="Times New Roman">In general, when
the DEMA(D-ratio) is below the red line the stock is Sell [or Short] and
</FONT></FONT></EM></DIV>
<DIV><EM>above the green line it is Buy [or Cover]</EM></DIV>
<DIV>You may see INTC example in the att. gif.</DIV>
<DIV>[for [Z=5, D1=13, D2=17] the % Net profit exceeds +800% from Jan2000]<FONT
face=Verdana size=2></DIV>
<DIV></FONT><BR><BR> </DIV></FONT></FONT></BODY></HTML>
------=_NextPart_001_001E_01C21B76.DC2B20A0--
Attachment:
gif00368.gif
Attachment:
Description: "Description: GIF image"
|