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

Re: [amibroker] Re: The D-ratio and its application



PureBytes Links

Trading Reference Links


Dimitris,
 
There have been many ideas raised here on this message 
board, many of them come from you. Each one I explore helps me to develop an 
awareness for the behavior of indicators and shows ways to code in afl many 
techniques. Slowly, I think that I am progressing. I feel sure that some day I 
will have a system that I will understand and that will work for me.  
Thanks for all of your help.
 
Greg
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
dtsokakis 

To: <A title=amibroker@xxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx 
Sent: Monday, June 24, 2002 3:30 PM
Subject: [amibroker] Re: The D-ratio and 
its application
Greg,There is no need to follow "verbatim" the 
lines.I am sure you will see your own way to handle the D-ratio, it is an 
interesting parameter.Just try to code your ideas and see the results 
and the possible improvements.AFL is powerful enough for this 
purpose.Systems are presented here to give more ideas on T/A, not to be 
applied as is.DT--- In amibroker@xxxx, "greg" 
<greg.bean@xxxx> wrote:> Dimitris,> > I'm looking 
at this from a different angle now, maybe it's the slope of the yellow 
line that needs to be exploited. Also if a trendline were used acrossthe 
two peaks of the yellow line at 24/09/01 and 04/10/01 maybe the long buy 
would have gone for more profit and the short trade that hasn't endedyet 
would not have been initiated or should have been terminated with a stop. 
These are just a few thoughts I've had while working my way through this 
study, it will be interesting to see if a profitable and tradable system 
will evolve.> > Greg>   ----- Original 
Message ----- >   From: greg >   To: 
amibroker@xxxx >   Sent: Monday, June 24, 2002 2:08 
PM>   Subject: Re: [amibroker] The D-ratio and its 
application> > >   Dimitris,> 
>   I haven't run a complete optimization yet. It looks like 
it will tie up my computer for a long time, so I'll try 
later.>   Something I've noticed when looking at INTC chart, 
is that there is a long buy at 24/09/01 ending at 22/10/01. There wasmore 
that could have been made after this trade ended but no signals from the 
afl as it is now. When I look at the D-Ratio chart pane it looks like 
maybe using HHV and LLV of the yellow line would give might get more 
out of a trade. Peak to trough of yellow would be a long buy and 
trough to peak would be a short. I don't think I have the know how to 
rearrange your afl to test for results using the yellow line for buy 
and sell signals, if this approach interests you, maybe you would be 
so kind to try it out and let me know what your results are. I'm 
looking forward to reading your comments and hope that my comments 
will be useful.> >   
Greg>     ----- Original Message ----- 
>     From: Dimitris Tsokakis 
>     To: amibroker@xxxx 
>     Sent: Monday, June 24, 2002 6:01 
AM>     Subject: [amibroker] The D-ratio and its 
application> > >     A. 
Definition>     The D-ratio is defined 
as>     D-ratio = 
500*(H-L)/(H+L)>     To avoid sudden spikes but 
keep the line properties, it is useful to consider a fast moving average 
like >     DEMA(D-ratio,5), which usually 
oscillates in the [0,100] region.>     Slightly 
negative values or values above 100 may appear, but not 
frequently.>     B. 
Range>     The range of D-ratio and its DEMA comes 
from the Exploration>     /*D-ratio 
range*/>     
R=500*(H-L)/(H+L);>     
Z=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");> >     Explore for the n=1last 
quotation.>     For N100 stocks, the ,"HIGHESTDEMA 
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 
for the 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]> > 
>      > > 
>     Your use of Yahoo! Groups is subject to the 
Yahoo! Terms of Service. > > 
>         Yahoo! Groups Sponsor 
>               
ADVERTISEMENT>              
>        
>        > 
>   Your use of Yahoo! Groups is subject to the Yahoo! Terms 
of Service.Your 
use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.