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

Re: Percent 10 and Hi-Lo ratio



PureBytes Links

Trading Reference Links

Hi CC Chen,
I would suggest to read first
http://www.amibroker.com/newsletter/12-2001.html
Calculating multiple security statistics using AFL scripting
Then take a look in various examples in AFL Library, as
http://www.amibroker.com/library/detail.php?id=52
or
http://www.amibroker.com/library/detail.php?id=71
http://www.amibroker.com/library/detail.php?id=80
etc.,
where you will find similar calculations referring to
the population of a group with a certain property.
See also recent posts #5784 and #5797 to kb question.
Dimitris Tsokakis 
--- In amibroker@xxxx, bbj@xxxx wrote:
> Help!
> Could anyone create a code to calculate %10 and Hi-Lo ratio.
> description of %10 ,
> Calculate the amount(AM50) of stocks whose C is above the 50ma in 
a 
> specific sector(TM), and then calculate AM50/TM. After this draw it 
> into a chart.
> 
> AM50= total amount of C> ma(C,50)
> TM= total amount of the stocks in a specific group or sector.
> 
> %10 = 100*AM50/TM
> 
> description of Hi-Lo ratio,
> (Amount(HM) of the stocks whose C is the 1yrHigh )/ (the sum of 
the 
> amount of the 1 yrHigh and 1yrLow(LM))
> 
> Hi-Lo ratio = 100*Hm/(HM+LM)
> 
> These two indicators are useful in predicting the Index moving 
> direction.
> 
> Thanks a lot.
> CC Chen