| 
 PureBytes Links 
Trading Reference Links 
 | 
 Hi, 
Here 
is my first try for Dev-stop.  
//dev-stop C.Kase, 
ver.1.0 
perstop=20; 
Hh1=HHV(H,2); 
Ll1=LLV(L,2); 
tr=Max(Hh1-Ll1,Max(abs(Hh1-Ref(C,-2)),abs(Ll1-Ref(C,-2)))); 
MAtr=MA(tr,perstop); 
sd=StDev(tr,perstop); 
ddev1=MAtr+sd; 
ddev2=MAtr+2.2*sd; 
ddev3=MAtr+3.5*sd; 
Since I have a day 
job, it is highly unlikely to use the Kase system for trading. I do not have 
access to real time data, nor the time to follow it (Kase has 4 screens, 1 
weekly, 1 daily, one monitor 1/5 from daily and one timing screen 1/3 
to 1/5 from the monitor period). Also, for the moment i cannot code properly a 
divergence (so to be able to backtest properly and use KCD and PeakOsc). 
However, I intend to backtest and eventually use Dev-Stop (for the moment i use 
3*ATR(20) as a trailing stop) and the Permission screen (Stochastic in a 
5-day timeframe, not necessarily weekly).  
About the permission 
screen, I tried to code it as a function and i have the following problem: when 
I call it in a daily chart, instead of having the same value for 5 
days, i have the period value per day. Does anyone know how I can "expand" 
back this value? The code is below (part of it is borrowed from a file found in 
Amibroker Library). I want to use it inserted in a daily 
chart. 
function  
KasePerm()
{ 
barnum = Cum(1); 
numbars = LastValue(barnum); 
factor = 5; // compress FACTOR bars into 1 
// number of compressed bars 
numcbars = ceil(numbars / 
factor); 
delta = numbars - barnum; 
factorbeginidx = - factor * delta - factor + 1 + delta; 
factorendidx = - factor * delta + delta; 
newo = IIf(barnum < numbars - 
numcbars, 0, Ref(O, 
factorbeginidx)); 
newh = IIf(barnum < numbars - 
numcbars, 0, Ref(HHV(H, factor), factorendidx)); 
newl = IIf(barnum < numbars - 
numcbars, 0, Ref(LLV(L, factor), factorendidx)); 
newc = IIf(barnum < numbars - 
numcbars, 0, Ref(C, 
factorendidx)); 
Daystart_str = WriteVal(Ref(Year(), factorbeginidx), 
1.0) + "-" 
+ 
WriteVal (Ref(Month(), factorbeginidx), 
1.0) + "-" + WriteVal(Ref(Day(),
factorbeginidx), 1.0); 
Dayend_str = WriteVal(Ref(Year(), factorendidx), 1.0) + "-" + 
WriteVal (Ref(Month(), factorendidx), 
1.0) + "-" + WriteVal(Ref(Day(),
factorendidx), 1.0); 
per=9; 
FSK = 100*(newc-LLV(newl,per)) / (HHV(newh,per)-LLV(newl,per)) ; 
 
FSDSSK = MA( FSK,3 );  
SSD = MA( FSDSSK,3 ) ;  
result=IIf(FSDSSK>SSD,1,-1); 
return  result;
} 
  
res=KasePerm(); 
Plot (res,"KasePerm",colorblack,styleLine);
 Thanks,
Razvan 
   
   I myself 
  never coded the Dev-stop yet.  
  By the way there were a few code 
  improvements mentioned here:
  http://finance.groups.yahoo.com/group/amibroker/message/61756 http://finance.groups.yahoo.com/group/amibroker/message/61855
  I'd 
  be very interested to hear if any of you guys managed to extract  some 
  consistent profits with it, at least in backtesting. I hardly  use any 
  traditional TA, still think Kase's work is exceptional but  never got to 
  implement it.  
  -treliff
  --- In amibroker@xxxxxxxxxxxxxxx, 
  "MPLM (Intel EPSD) Razvan Andrei"  <randrei@xxxx> wrote: > 
  Hi, > I think I found the problem, was in data: for a period equal with 
   minLB the > Close was constant, as a result Kvol become 0 and KSDIup 
  and KSDIdn  cannot > be calculated (division by 0!). > 
  Thanks, > Razvan >   -----Mesaj 
  original----- >   De la: Jerry Gress 
  [mailto:pleasenospamplease@xxxx] >   Trimis: 10 februarie 2005 
  12:32 >   Către: amibroker@xxxxxxxxxxxxxxx >   
  Subiect: RE: [amibroker] Re: Cynthia Kase indicators >  > 
   >   HI, >  >  >  >   I have 
  no problems with this code, Using AB 4.60 on tick intraday  data. > 
  The only problem is high cpu usage in real time over 50%. >  > 
   >  >   Jerry Gress >  >   
  Stockton, Ca. >  >  >  >   -----Original 
  Message----- >   From: MPLM (Intel EPSD) Razvan Andrei 
  [mailto:randrei@xxxx] >   Sent: Wednesday, February 09, 2005 
  11:41 PM >   To: amibroker@xxxxxxxxxxxxxxx >   
  Subject: [amibroker] Re: Cynthia Kase indicators >  >  > 
   >   Hi, >  >   thank you for your code. 
  I paste it as it was in your post and I  have a > small problem: for 
  many stocks, everything is going well until a  moment when > KPeakOsc 
  becomes {Empty} PeakOutMax and PeakOutMin become 0. After  this > 
  moment PeakOutMax and Min remain {Empty}. Do you have any ideea how  can 
  I > avoid this? >  >   Did you managed to look 
  (and code ;)) the Kase Dev-Stop? >  >   Thanks 
  again, >  >   Razvan > 
   >     -----Mesaj 
  original----- >     De la: treliff 
  [mailto:treliff@xxxx] >     Trimis: 4 februarie 2005 
  18:43 >     Către: 
  amibroker@xxxxxxxxxxxxxxx >     Subiect: [amibroker] 
  Re: Cynthia Kase indicators >  >  >     
  there's a thread here re. the PeakOscillator which includes KSDI > 
   >     http://finance.groups.yahoo.com/group/amibroker/message/60990 > 
   >  >     --- In amibroker@xxxxxxxxxxxxxxx, 
  Stas Desy <stasdesy@xxxx>  wrote: >     
  > Hi All, >     
  > >     > Does anybody now of an 
  implementation of Cynthia Kase >     > studies in 
  AB ? >     > I'm particularly interested in KSDI 
  (serial dependency >     > index). > 
   >  >  >  >  >     Check 
  AmiBroker web page at: >     http://www.amibroker.com/ > 
   >     Check group FAQ at: > http://groups.yahoo.com/group/amibroker/files/groupfaq.html > 
   >  >  >     Check AmiBroker web page 
  at: >     http://www.amibroker.com/ > 
   >     Check group FAQ at: > http://groups.yahoo.com/group/amibroker/files/groupfaq.html > 
   >  >  >  >  >  > 
   >     Check AmiBroker web page 
  at: >     http://www.amibroker.com/ > 
   >     Check group FAQ at: > http://groups.yahoo.com/group/amibroker/files/groupfaq.html > 
   >  >           
  Yahoo! Groups 
  Sponsor >                 
  ADVERTISEMENT >  >  >  >  >  > 
  -------------------------------------------------------------------- -------- >     
  Yahoo! Groups Links >  >       a.. 
  To visit your group on the web, go 
  to: >       http://groups.yahoo.com/group/amibroker/ > 
   >       b.. To unsubscribe from this 
  group, send an email to: >       
  amibroker-unsubscribe@xxxxxxxxxxxxxxx > 
   >       c.. Your use of Yahoo! Groups is 
  subject to the Yahoo! Terms  of > 
  Service.
 
 
 
 
  Check AmiBroker web page at: http://www.amibroker.com/
  Check 
  group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  
 
  
  
Check AmiBroker web page at: 
http://www.amibroker.com/ 
 
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
  
 
| Yahoo! Groups Sponsor | 
 
 | 
 
![]()  |  
 
 
 
Yahoo! Groups Links 
  |