echo "<th bgcolor='#e0f0ff'>前日終値</th>"; echo "<th bgcolor='#e0f0ff'>前日高値</th>"; echo "<th bgcolor='#e0f0ff'>前日安値</th>"; echo "<th bgcolor='#e0f0ff'>始値</th>"; echo "<th bgcolor='#e0f0ff'>高値</th>"; echo "<th bgcolor='#e0f0ff'>安値</th>"; echo "<th bgcolor='#e0f0ff'>現在値</th>"; echo "<th bgcolor='#e0f0ff'>GU/GD</th>"; echo "<th bgcolor='#e0f0ff'>前日高値/安値ブレイク</th>"; echo "<th bgcolor='#e0f0ff'>削除</th>"; echo "</tr>"; $count = 1; foreach ($monitorStocks as $code) { echo "<tr>"; $stock->getStockDayInfoFromCode($code . "-T", $beforeDate); $beforeStock = $stock->getNext(); $crawler = new StockCrawler(); $crawler->getStockPrice($code); $beforeClosingPrice = $beforeStock["終値"]; $beforeHighPrice = $beforeStock["高値"]; $beforeLowPrice = $beforeStock["安値"]; $openingPrice = $crawler->getOpeningPrice(); $highPrice = $crawler->getHighPrice(); $lowPrice = $crawler->getLowPrice(); $nowPrice = $crawler->getNowPrice(); // GU/GD 判定 $gugd = "-"; if ($openingPrice > $beforeHighPrice) { $gugd = "GU +" . Common::changeStockFormat($openingPrice - $beforeHighPrice); } else { if ($openingPrice < $beforeLowPrice) {
<?php $stock->getPrepare($date, $selectedMarkets, $closingPrice, $rangePrice, $volume, $unitShares, $unitVolume, $sort, $order); echo "<table rules='all' border='1' cellspacing='0' cellpadding='2' style='font-size : 14px;' bordercolor='#a0b0ff'>"; echo "<caption>{$date}</caption>"; echo "<tr>"; // 項目行 echo "<th bgcolor='#e0f0ff'>No.</th>"; foreach ($stock->getItemsName() as $item) { echo "<th bgcolor='#e0f0ff'>{$item}</th>"; } echo "</tr>"; $count = 1; while ($result = $stock->getNext()) { echo "<tr>"; echo "<td align='right'>" . $count . "</td>"; $keys = array_keys($result); $countMax = count($keys); for ($i = 0; $i < $countMax; $i++) { $key = $keys[$i]; $value = $result[$key]; if ($i >= 3 && is_numeric($value)) { $colorValue = "000000"; $prefixValue = ""; $suffixValue = ""; if ($key === '前日比') { $colorValue = colorForValue($value); $prefixValue = $value < 0 ? "▼" : "▲"; }