PureBytes Links
Trading Reference Links
|
Dear Dimitris,
Just a short comment:
if you intention was to apply variable exponential
smoothing in 3)
s1=f*STOCHK()+(1-f)*REF(STOCHK(),-1);
is NOT the correct way to do this.
Exponential smoothing is a recurrent function and you
would
need an AMA for that:
s1=AMA( STOCHK(), f );
As it internally implements algorithm s1[bar
] = f * stoch(k) + (1-f) * s1[ bar - 1 ];
Best regards,Tomasz Janeczko===============AmiBroker - the
comprehensive share manager.<A
href="">http://www.amibroker.com
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
Dimitris
Tsokakis
To: <A title=amibroker@xxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Monday, August 27, 2001 3:59
PM
Subject: [amibroker] Optimize
it!
1. BUY AND SELL LEVELS
Suppose you work with stochd(14) and you search
the best level
to buy and sell.
/*Optimized Levels*/
SELLLEVEL=optimize("SL",70,60,80,1);BUYLEVEL=optimize("
BL ",30,20,40,1);s1=stochd();buy = cross( s1,BUYLEVEL);sell =
cross(
SELLLEVEL,s1);buy=exrem(buy,sell);sell=exrem(sell,buy);
For best levels SL=68 and BL=24, you may see
with
BL=24;
SL=68;
graph0=stochd();
graph1=BL;
graph2=SL;
graph2style=1;
graph1barcolor=graph2barcolor=2;
2. SHORT TERM, LONG TERM OR MIXED ?
/*Short and Long term Stochastic*/
<FONT
size=2>f=optimize("F",0.5,0,1.1,0.1);s1=f*stochd(14)+(1-f)*stochd(24);buy
= cross( s1,30);sell = cross(
70,s1);buy=exrem(buy,sell);sell=exrem(sell,buy);
A result F=0.3 means that the "best stochastic" forthe
certain stock is
an average of 30% stochd(14) and 70% stochd(24)
f=0.3;
graph0=f*stochd(14)+(1-f)*stochd(24);
graph1=30;
graph2=70;
graph2style=1;
graph1barcolor=graph2barcolor=2;<FONT
size=2>
3. THE BEST STOCHD
Stochd is a 3 days average of stochk. Is it the best for
your stock?
/*The Best Stochd*/
<FONT
size=2>f=optimize("F",0.5,0,1.1,0.1);s1=f*STOCHK()+(1-f)*REF(STOCHK(),-1);buy
= cross( s1,30);sell = cross(
70,s1);buy=exrem(buy,sell);sell=exrem(sell,buy);
An optimum result F=0.9 means that the best stochd function
is
f=0.9;
graph0=f*stochk()+(1-f)*(ref(stochk(),-1);
graph1=30;
graph2=70;
graph2style=1;
graph1barcolor=graph2barcolor=2;
and so on.
Dimitris Tsokakis
Your
use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
|