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

Re: [amibroker] OT. - Kase Oscillators



PureBytes Links

Trading Reference Links

FYI,

Here is some code for Kase Dev Stops mentioned in the article posted 
earlier:

Wayne

//*********************************************************
//Kase DevStop I

AVTR= MA(HHV(H,3) - LLV(L,2),21);
SD= StDev(HHV(H,3) - LLV(L,2),21);

Val4= HHV(H-AVTR-3.4*SD,21);
Val3= HHV(H-AVTR-2.1*SD,10);
Val2= HHV(H-AVTR-SD,34);
Val1= HHV(H-AVTR,21);


/* Kase DevStop II

Pd= Param("Max Length",13,100,30,2);

RWH= (H-Ref(L,-Pd))/(ATR(Pd)*sqrt(Pd));
RWL= (Ref(H,-Pd)- L)/(ATR(Pd)*sqrt(Pd));

Pk= WMA((RWH-RWL),3);
AVTR= MA(HHV(H,2) - LLV(L,2),20);
SD= StDev(HHV(H,2) - LLV(L,2),20);

Val4= IIf(Pk>0,HHV(H - AVTR-3.6*SD,21),LLV(L + AVTR+3*SD,21));
Val3= IIf(Pk>0,HHV(H - AVTR-2.2*SD,10),LLV(L + AVTR+2*SD,10));
Val2= IIf(Pk>0,HHV(H - AVTR-1.0*SD,30),LLV(L + AVTR+SD,30));
Val1= IIf(Pk>0,HHV(H - AVTR,21),LLV(L + AVTR,21));*/

Plot(Val4,"3SDev",IIf(Val4 > C OR Val4 < Ref(Val4,-1),34,42),24);
Plot(Val3,"2SDev",IIf(Val3 > C OR Val3 < Ref(Val3,-1),16,34),24);
Plot(Val2,"1SDev",6,24);
Plot(Val1,"Warning",32,1);
Plot(C,"close",55,64);



/*As can be seen from the formula, Kase uses standard deviations for the 
user to decide at what point to exit a position. Stops are set where 
there is increasing statistical probability of reversal against the 
trend. This issupposedly based on the log normal shape of the curve of 
the range curve.The manual which describes how to operate the software 
is at http://www.fimi.com/Kase/k0.htm





Philosophy:

The DevStop is the closest we can come to an ideal stop level in the 
real world. The indicator mathematics accounts for volatility (which is 
directly proportional to risk), AND also for the variance of volatility 
(how much risk changes from bar to bar) AND volatility skew (the 
propensity for volatility to spike higher from time to time).

Specifically, the DevStop places exit points at 1, 2 AND 3 standard 
deviations over the mean two bar True Range, corrected for skew. So we 
can take profit OR cut losses at levels at which the probability of a 
trade remaining profitable is Low, without taking more of a loss OR 
cutting profits any sooner than necessary.

Interpretation:

The stop consists of four exit points, a Warning line AND Dev 1, 2 AND 
3. Two closes against the warning count as Dev 1.*/




>  
>



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/