</tr> </thead> <?php $tablestate = "row_odd"; $prevMonth = ""; $allMonths = array(); $first = true; foreach ($abandon as $holding) { $hid = $holding['holdings_id']; $hitT3 = $holding['holdings_t3_marked']; $t3 = floatval($holding['holdings_t3']); $abandon = $holding['holdings_stop_price']; $start = $holding['holdings_orig_price']; $symbol = $holding['holdings_ticker_symbol']; $tradeType = $holding['holdings_tradetype']; $return_percent = holdings::GetReturnPercent($tradeType, 0, $start, 0, 0, $t3, false, false, $hitT3, $abandon); // process months into array for select $abandonMonth = date("F Y", strtotime($holding['holdings_abandon_date'])); if ($abandonMonth != $prevMonth) { $prevMonth = $abandonMonth; $allMonths[] = $abandonMonth; if (!$first) { echo "</tbody>"; $first = false; } echo "<tbody id=\"month_" . str_replace(" ", "", $abandonMonth) . "\" class=\"monthTable\">"; } echo '<tr class="table_row ' . $tablestate . ' ">'; echo '<td class="lowpriority">' . date("Y-m-d", strtotime($holding['holdings_orig_date'])) . '</td>'; echo '<td class="lowpriority">' . date("Y-m-d", strtotime($holding['holdings_abandon_date'])) . '</td>'; $symbol = strtoupper($holding['holdings_ticker_symbol']);
$first = true; foreach ($abandon as $holding) { $hid = $holding['holdings_id']; $tradeType = $holding['holdings_tradetype']; if ($tradeType == REVERSAL_TRADE) { continue; } $hitT1 = $holding['holdings_t1_marked']; $hitT2 = $holding['holdings_t2_marked']; $hitT3 = $holding['holdings_t3_marked']; $t1 = floatval($holding['holdings_t1']); $t2 = floatval($holding['holdings_t2']); $t3 = floatval($holding['holdings_t3']); $start = $holding['holdings_orig_price']; $abandon = $holding['holdings_stop_price']; $return_percent = holdings::GetReturnPercent($tradeType, 0, $start, $t1, $t2, $t3, $hitT1, $hitT2, $hitT3, $abandon); $tradeClass = strtolower(GetTradeTypeConstantNameSingular($tradeType)); $tradeString = GetTradeTypeConstantNameSingular($tradeType); $ti = GetTradeIndex($tradeType); $valuation = 5000 * $return_percent / 100; // process months into array for select $abandonMonth = date("F Y", strtotime($holding['holdings_abandon_date'])); if ($abandonMonth != $prevMonth) { $prevMonth = $abandonMonth; $allMonths[] = $abandonMonth; if (!$first) { //echo "</tbody>"; $first = false; } //echo "<tbody id=\"month_".str_replace(" ", "", $abandonMonth) ."\" class=\"monthTable\">"; }
$prevMonth = ""; $allMonths = array(); $first = true; foreach ($abandons as $holding) { $hid = $holding['holdings_id']; $hitT1 = $holding['holdings_t1_marked']; $hitT2 = $holding['holdings_t2_marked']; $hitT3 = $holding['holdings_t3_marked']; $t1 = floatval($holding['holdings_t1']); $t2 = floatval($holding['holdings_t2']); $t3 = floatval($holding['holdings_t3']); $start = $holding['holdings_top_price']; $orig = $holding['holdings_orig_price']; $abandonPrice = $holding['holdings_stop_price']; $tradeType = $holding['holdings_tradetype']; $return_percent = holdings::GetReturnPercent($tradeType, 0, $orig, $t1, $t2, $t3, $hitT1, $hitT2, $hitT3, $abandonPrice); // process months into array for select $abandonMonth = date("F Y", strtotime($holding['holdings_abandon_date'])); if ($abandonMonth != $prevMonth) { $prevMonth = $abandonMonth; $allMonths[] = $abandonMonth; if (!$first) { echo "</tbody>"; $first = false; } echo "<tbody id=\"month_" . str_replace(" ", "", $abandonMonth) . "\" class=\"monthTable\">"; } echo '<tr class="table_row ' . $tablestate . ' ">'; echo '<td class="lowpriority">' . date("Y-m-d", strtotime($holding['holdings_orig_date'])) . '</td>'; echo '<td class="lowpriority">' . date("Y-m-d", strtotime($holding['holdings_abandon_date'])) . '</td>'; $symbol = strtoupper($holding['holdings_ticker_symbol']);
$holdCounter++; $holdId = $holding['holdings_id']; $tId = $holding['ticker_id']; $lastActionStr = GetLastActionString($index, $holding['holdings_last_action']); $last = $holding['last']; $hitT1 = $holding['holdings_t1_marked']; $hitT2 = $holding['holdings_t2_marked']; $hitT3 = $holding['holdings_t3_marked']; $t1 = floatval($holding['holdings_t1']); $t2 = floatval($holding['holdings_t2']); $t3 = floatval($holding['holdings_t3']); $start = $holding['holdings_top_price']; if ($index == BREAKDOWN_TRADE || $index == BREAKOUT_TRADE) { $start = $holding['holdings_orig_price']; } $return_percent = holdings::GetReturnPercent($index, $last, $start, $t1, $t2, $t3, $hitT1, $hitT2, $hitT3); $t1Class = $hitT1 ? "owned" : ""; $t2Class = $hitT2 ? "owned" : ""; $t3Class = $hitT3 ? "owned" : ""; echo '<tr class="table_row ' . $tablestate . ' ">'; echo '<td>' . date("Y-m-d", strtotime($holding['holdings_orig_date'])) . '</td>'; echo '<td><a class="stocklink" target="_blank" href="https://www.google.com/finance?q=' . strtoupper($holding['ticker_symbol']) . '" >' . strtoupper($holding['ticker_symbol']) . '</a></td>'; echo '<td>' . number_format($holding['last'], 2) . '</td>'; if ($index == BREAKOUT_TRADE || $index == BREAKDOWN_TRADE) { echo '<td class="' . $t3Class . '">' . number_format($holding['holdings_t3'], 2) . '</td>'; } else { if ($index == BACKDRAFT_TRADE || $index == PULLBACK_TRADE) { echo '<td class="' . $t1Class . '">' . number_format($holding['holdings_t1'], 2) . '</td>'; } else { echo '<td class="' . $t1Class . '">' . number_format($holding['holdings_t1'], 2) . '</td>'; echo '<td class="' . $t2Class . '">' . number_format($holding['holdings_t2'], 2) . '</td>';
<th></th> </tr> </thead> <tbody> <?php $holdings = ticker_group_info::retrieveHoldingsArray(LONG_TRADE, true); $tablestate = "row_odd"; $borderTop = "borderTop"; foreach ($holdings as $holding) { $tt = intval($holding['holdings_tradetype']); //if ($tt == BREAKDOWN_TRADE) continue; $last = $holding['last']; $ttStr = GetTradeTypeConstantNameSingular($tt); $tablerowtype = strtolower($ttStr); $start = $holding['holdings_orig_price']; $return_percent = holdings::GetReturnPercent($tt, $last, $start, 0, 0, 0, 0, 0, 0); echo '<tr class="table_row2 ' . $tablestate . ' ' . $tablerowtype . '">'; echo '<td class="left borderLeft ' . $borderTop . '">' . strtoupper($holding['ticker_symbol']) . '</td>'; echo '<td class="center ' . $borderTop . '">' . $ttStr . '</td>'; echo '<td class="center ' . $borderTop . '">' . number_format($holding['last'], 2) . '</td>'; echo '<td class="center ' . $borderTop . '">' . number_format($start, 2) . '</td>'; echo '<td class="center ' . $borderTop . '">' . date("m-d-Y", strtotime($holding['holdings_orig_date'])) . '</td>'; echo '<td class="center borderRight ' . $borderTop . '">' . number_format($return_percent, 2) . '%</td>'; echo '</tr>'; $borderTop = ""; } ?> </tbody> </table> </div> <!-- tablegroup -->