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

RE: [amibroker] The use of the Powsmooth



PureBytes Links

Trading Reference Links










<span
>Dimitris<font
size=2 color=navy face=Arial>,

 

Without the _javascript_:

 

<font
size=1 color=green face="Courier New">/*PowSmooth and an
application to Dratio*/<font size=1
color=black face="Courier New">

<span
class=SpellE><span
>dratio<span
class=GramE>=<font
size=1 color=blue face="Courier New">DEMA<font size=1 color=black
face="Courier New">(<span
>1000<font
size=1 color=black face="Courier New">*(H-<span
>L)/(H+<span
>L),<font size=1
color=fuchsia face="Courier New">20<span
>);

<font
size=1 color=black face="Courier New"> 

<span
class=GramE><span
>for<font
size=1 color=black face="Courier New">(<font
size=1 color=black face="Courier New">i<font size=1 color=black
face="Courier New">=<span
>2<font
size=1 color=black face="Courier New">;i<BarCount;i++)

<font
size=1 color=black face="Courier New">{

<font
size=1 color=black face="Courier New">       <span
class=GramE>t0[i]=(dratio[<span
class=SpellE>i]*dratio[i-<font
size=1 color=fuchsia face="Courier New">1<font size=1
color=black face="Courier New">]*dratio[i-<font size=1
color=fuchsia face="Courier New">2<span
>])^(<font
size=1 color=fuchsia face="Courier New">1<font size=1
color=black face="Courier New">/<span
>3<font
size=1 color=black face="Courier New">);

<font
size=1 color=black face="Courier New">       <span
class=GramE>s0[i]=(dratio[<span
class=SpellE>i]*dratio[i-<font
size=1 color=fuchsia face="Courier New">1<font size=1
color=black face="Courier New">])^(<span
>1<font
size=1 color=black face="Courier New">/<font size=1 color=fuchsia
face="Courier New">2<span
>);

<font
size=1 color=black face="Courier New">}

<span
class=SpellE><span
>PowSmooth<span
class=GramE>=(<font
size=1 color=black face="Courier New">s0+t0)/<font size=1 color=fuchsia
face="Courier New">2<span
>;

<font
size=1 color=black face="Courier New"> 

<font
size=1 color=black face="Courier New">Filter<font
size=1 color=black face="Courier New">=<font size=1 color=fuchsia
face="Courier New">1<span
>;

<span
class=SpellE><span
>AddColumn<span
class=GramE>(<span
class=SpellE><span
>dratio,<font
size=1 color=fuchsia face="Courier New">"DRATIO<font
size=1 color=fuchsia face="Courier New">"<font size=1
color=black face="Courier New">);

<span
class=SpellE><span
>AddColumn<span
class=GramE>(<font
size=1 color=black face="Courier New">s0,<font size=1 color=fuchsia
face="Courier New">"SQRT"<font size=1 color=black
face="Courier New">);

<span
class=SpellE><span
>AddColumn<span
class=GramE>(<font
size=1 color=black face="Courier New">t0,<font size=1 color=fuchsia
face="Courier New">"THIRD"<font size=1 color=black
face="Courier New">);

<span
class=SpellE><span
>AddColumn<span
class=GramE>(<span
class=SpellE><span
>Powsmooth,<font
size=1 color=fuchsia face="Courier New">"PowSmooth<font
size=1 color=fuchsia face="Courier New">"<font size=1
color=black face="Courier New">);

<span
class=GramE>Plot<font size=1
color=black face="Courier New">(<span
>dratio,<font
size=1 color=fuchsia face="Courier New">"dratio"<font
size=1 color=black face="Courier New">,<font size=1 color=fuchsia
face="Courier New">1<span
>,<font
size=1 color=fuchsia face="Courier New">8<font size=1
color=black face="Courier New">);

<span
class=GramE>Plot<font size=1
color=black face="Courier New">(<span
>PowSmooth,<font
size=1 color=fuchsia face="Courier New">"PowSmooth"<font
size=1 color=black face="Courier New">,<font size=1 color=fuchsia
face="Courier New">7<span
>,<font
size=1 color=fuchsia face="Courier New">1<font size=1
color=black face="Courier New">);

<font
size=1 color=black face="Courier New"> 

<font
size=1 color=black face="Courier New">RRR=Powsmooth<span
class=GramE>;/<font
size=1 color=green face="Courier New">/ Replace this line with RRR=dratio;
to see the usual Dratioresults<font
size=1 color=black face="Courier New">

<font
size=1 color=black face="Courier New">D1=<font size=1 color=fuchsia
face="Courier New">35<span
>;

<font
size=1 color=black face="Courier New">F1=RRR>=D1;F2=RRR<=D1;

<font
size=1 color=black face="Courier New">Sell<font size=1
color=black face="Courier New">=F2;Buy=F1;<span
>Buy=<font
size=1 color=blue face="Courier New">ExRem<font size=1 color=black
face="Courier New">(Buy,<span
>Sell);Sell=<font size=1 color=blue
face="Courier New">ExRem<font size=1 color=black
face="Courier New">(Sell,<span
>Buy);

<font
size=1 color=black face="Courier New">Short<font
size=1 color=black face="Courier New">=Sell;Cover=<span
class=SpellE>Buy;<span
>Short=<span
class=SpellE>ExRem<font
size=1 color=black face="Courier New">(Short,Cover);<span
>Cover=<font
size=1 color=blue face="Courier New">ExRem<font size=1 color=black
face="Courier New">(Cover,<span
>Short);

 

Regards,

Peter

 

<span
>-----Original Message-----
From: Dimitris Tsokakis
[mailto:TSOKAKIS@xxxxxxxxx] 
Sent: Saturday, May 10, 2003 7:19
AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] The use of
the Powsmooth

<span
> 



<span
>The basic property of the Powsmooth 





<span
><a
href="">http://groups.yahoo.com/group/amibroker/message/40077





<span
>is to filter out fast zigzags, passing through them,
without introducing important lags.





<span
>When we use a cross level trading system, many times
we loose money because of oscillation of our indicator around the





<span
>critical cross level. 





<span
>If our cross level is "good", then we should
expect [and we shall see...] strong ask and bid when we are close to this
level. 





<span
>The result is the well known repeated whipsaws, which
usually annihilate our profits.





<span
>Unfortunately, the solution is not to smooth our
nervous indicator, it will usually loose its charm to catch quickly the market
changes.





<span
>In this case [traders who use fast indicators will
understand very well this syndrom...] the PowSmooth may offer great assistance.





<span
>Its smart curve will gently pass between the
accumulated ziggy points, avoid cascade entries/exits and substantially
increase our profits.





<span
>See a characteristic example in the att. gif.





<span
>In the first case, the dratio gives 8 trades in two
months, with a final +13%, oscillating around the critical level D=35.





<span
>The PowSmooth, for the same ^NDX period, gives two
clear trades and maximizes the profits to +20%.





<span
>[settings buy/sell/short/cover at +1open, commission
0.5%, stops disabled]





<span
>The level D=35 is critical for the market, the D_ratio
frequntly oscillates up and down, until the market takes the decision to go
higher





<span
>or lower. 





<span
>The usual D_ratio system gives for the whole market
nice profits, +340% since Jan2000.





<span
>The PowSmooth D_datio makes the difference : +940% for
the same period and settings.





<span
>For ^NDX we could nearly double the profits:





<span
>Usual D_ratio : +550%, 37trades/28winners/9losers





<span
>PowSmooth : +1165%, 27trades/23winners/4losers.





<span
>A +550% is not that bad, a +1165% is much better.





<span
>For CSCO, the signal generator of this transcendental
system [since we "borrow" CSCO data for the basic curve] the
situation needs





<span
>no further comments : the comparison is +370% vs
+2000%.





<span
>If you use fast and ziggy indicators and Cross level
systems, take a look at the PowSmooth, it may make you smile.





<span
>Dimitris Tsokakis





<span
>I use the trancendental CSCO D_ratio code





<span
>/*Powsmooth CSCO D_ratio, written and used by
D.Tsokakis, Sept 2002*/





<span
>H=Foreign("CSCO","H");L=Foreign("CSCO","L");
dratio=DEMA(1000*(H-L)/(H+L),20);
EnableScript("jscript");
<%
dratio = VBArray( AFL( "dratio" ) ).toArray();
s=new Array();t=new Array();
s[0]=0;t[0]=0;
for(i=1;i<dratio.length;i++)
{
{t[i]=Math.pow((dratio[i]*dratio[i-1]*dratio[i-2]),1/3);}
{s[i]=Math.pow((dratio[i]*dratio[i-1]),1/2);}
}
AFL.Var("s0") =s ;
AFL.Var("t0")=t;
%>
Powsmooth=(s0+t0)/2;





<span
>RRR=Powsmooth;// Replace this line with RRR=dratio; to
see the usual Dratioresults
D1=35;
F1=RRR>=D1;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);



<span
>



<font size=2
face="Courier New">Send BUG REPORTS to
bugs@xxxxxxxxxxxxx<span
>
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to:
amiquote@xxxxxxxxxxxxxxx 
(Web page: <a
href="">http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: <a
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html


Your use of
Yahoo! Groups is subject to the Yahoo!
Terms of Service. 










Yahoo! Groups Sponsor


ADVERTISEMENT









Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.