|
|
|
|
$filemod = filemtime("/home/finpres/csv/klse/close2.csv");
$filemodtime = date("F j Y ", $filemod);
$govar = $HTTP_GET_VARS["rn"];
echo "Cross Section Price Volatility ";
if(!$govar){
echo"Cross Section of Price Volatility display the respective list of stocks that have fluctuated within certain percentages from its moving 52-week low.";
echo"
Thus the group of stocks listed between 0 per cent - 10 per cent represent stocks whose closing prices are matching the moving 52 week low or within 10 per cent of the moving 52 week low.";
echo"
The opposite end of the percentile groups viz stocks that are at their new highs or within 10 per cent from their moving 52 week high. ";
}
?>
Print("Latest Close date: $filemodtime ");
$govar = $HTTP_GET_VARS["rn"];
if(!$govar){
echo "";
}
?>
| 52W High |
| | | |
| | | |
52W Low | |
Board |
0-10 |
10-20 |
20-30 |
30-40 |
40-50 |
50-60 |
60-70 |
70-80 |
80-90 |
90-100 |
No Trade |
Main |
$filename = "/home/finpres/csv/klse/volasum.csv";
$in = fopen($filename,"r");
$numcheck = 0;
while (!feof($in)) {
$line = fgets($in,4096);
list($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k) = split(",", $line,11);
if($numcheck == 0){
echo "$a | ";
echo "$b | ";
echo "$c | ";
echo "$d | ";
echo "$e | ";
echo "$f | ";
echo "$g | ";
echo "$h | ";
echo "$i | ";
echo "$j | ";
echo "$k | ";
echo "Second | ";
}
if($numcheck == 1){
echo "$a | ";
echo "$b | ";
echo "$c | ";
echo "$d | ";
echo "$e | ";
echo "$f | ";
echo "$g | ";
echo "$h | ";
echo "$i | ";
echo "$j | ";
echo "$k | ";
echo "Mesdaq | ";
}
if($numcheck == 2){
echo "$a | ";
echo "$b | ";
echo "$c | ";
echo "$d | ";
echo "$e | ";
echo "$f | ";
echo "$g | ";
echo "$h | ";
echo "$i | ";
echo "$j | ";
echo "$k | ";
echo " | | ";
}
$numcheck++;
}
$govar = $HTTP_GET_VARS["rn"];
$board = $HTTP_GET_VARS["per"];
if($govar){
if($govar == "na"){
$govar = "N/A";
}
//if($top != 0){
//$lowvar = 100 - $govar;
//$highvar = $lowvar + 10;
if($per == "1"){
echo "2nd Board: ";
}elseif($per == "3"){
echo "MESDAQ Board: ";
}else{
echo "Main Board: ";
}
if($govar == "1")echo " 0 to 10 percent of CLOSING PRICE TO 52 WEEK HI-LO VOLATILITY RANGE ( C % VR )";
if($govar == "2")echo " 10 to 20 percent of CLOSING PRICE TO 52 WEEK HI-LO VOLATILITY RANGE ( C % VR )";
if($govar == "3")echo " 20 to 30 percent of CLOSING PRICE TO 52 WEEK HI-LO VOLATILITY RANGE ( C % VR )";
if($govar == "4")echo " 30 to 40 percent of CLOSING PRICE TO 52 WEEK HI-LO VOLATILITY RANGE ( C % VR )";
if($govar == "5")echo " 40 to 50 percent of CLOSING PRICE TO 52 WEEK HI-LO VOLATILITY RANGE ( C % VR )";
if($govar == "6")echo " 50 to 60 percent of CLOSING PRICE TO 52 WEEK HI-LO VOLATILITY RANGE ( C % VR )";
if($govar == "7")echo " 60 to 70 percent of CLOSING PRICE TO 52 WEEK HI-LO VOLATILITY RANGE ( C % VR )";
if($govar == "8")echo " 70 to 80 percent of CLOSING PRICE TO 52 WEEK HI-LO VOLATILITY RANGE ( C % VR )";
if($govar == "9")echo " 80 to 90 percent of CLOSING PRICE TO 52 WEEK HI-LO VOLATILITY RANGE ( C % VR )";
if($govar == "10")echo " 90 to 100 percent of CLOSING PRICE TO 52 WEEK HI-LO VOLATILITY RANGE ( C % VR )";
if($govar == "N/A")echo " No Trade ";
// echo "$lowvar per cent to $highvar per cent Percentile Listing from Low
";
$filename = "/home/finpres/csv/klse/close2.csv";
$in = fopen($filename,"r");
include("txt/cltabf.txt");
$num = 0;
$cnt = 0;
while (!feof($in)) {
$line = fgets($in,4096);
list($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k,$l,$m,$n,$o,$p,$q,$r,$s,$pc,$mg,$t,$u,$v,$w,$x,$y,$z) = split(",", $line,28);
if($pc == $govar && $per == $p){
if ($cnt == 15) {
echo '
|
STOCK |
CODE |
PREV |
HIGH |
LOW |
CLOSE |
VOL |
C%VR |
52W-HI |
52W-LO |
52W-HLV |
52W-HCV |
PE |
DY |
MCR |
MIV |
P/OC |
';
$cnt = 0;
}
// $vola = volatility($e,$f);
$go = $num / 5;
$num++;
$cnt++;
// $u = 100-(($e-$g)/($e-$f)*100);
if (!($go % 2)) { //$chg | $vola |
echo "";
} else {
echo " ";
}
$kcode = substr($b,0,4);
echo "$num | $a | $b | $c | $e | $f | $g | $h | ";
echo "$mg | $n | $o | $r | $s | ";
if ($i <= 0) { //
echo "-VE | ";
} else {
echo "$i";
}
echo "$j | $k | $l | $m | ";
echo"";
}// end if
} // end while
echo ' KEY
C%VR = High-Close/High-Low * 100
Fall C%VR = 100% - C%VR |
| ';
echo " | |