getHoldingsReturn; } } ?> Apache Stonehenge StockTrader Welcome
Trade Alert: The following orders have completed.

"); print(""); $index = 0; while ($getClosedOrdersReturn->OrderDataBean[$index]) { print (""); $index ++; } print("
Order IDOrder StatusCreation DateCompletion Date Txn FeeTypeSymbolQuantity
".$getClosedOrdersReturn->OrderDataBean[$index]->orderID." ".$getClosedOrdersReturn->OrderDataBean[$index]->orderStatus." ".date("m/d/Y h:i:s A", $getClosedOrdersReturn->OrderDataBean[$index]->openDate)." ".date("m/d/Y h:i:s A", $getClosedOrdersReturn->OrderDataBean[$index]->completionDate)." $".$getClosedOrdersReturn->OrderDataBean[$index]->orderFee." ".$getClosedOrdersReturn->OrderDataBean[$index]->orderType." ".$getClosedOrdersReturn->OrderDataBean[$index]->symbol." ".$getClosedOrdersReturn->OrderDataBean[$index]->quantity."


"); } if ($holdingsReturn) { print ("

Portfolio Information

"); print (""); $index = 0; $purchaseBasis = 0; $marketValue = 0; $gain = 0; while ($holdingsReturn->HoldingDataBean[$index]) { $bean = $holdingsReturn->HoldingDataBean[$index]; if (!$quoteInfo[$bean->quoteID]) { $quotes = GetQuote($bean->quoteID); if ($quotes) $quotesReturn = $quotes->getQuoteReturn; $quoteInfo[$bean->quoteID] = $quotesReturn->price; } $purchaseBasis = $purchaseBasis + ($bean->purchasePrice) * ($bean->quantity); $marketValue = $marketValue + ($quoteInfo[$bean->quoteID]) * ($bean->quantity); $gain = ($quoteInfo[$bean->quoteID] - $bean->purchasePrice) * ($bean->quantity); print(""); $index ++; } print (""); } else if ($gain > 0) { print ("$".$gain.""); } else { print ("$".$gain.""); } print ("
Holding IDPurchase DateSymbol QuantityPurchase PriceCurrent Price Purchase BasisMarket ValueGain(Loss) Trade
".$bean->holdingID."".date("m/d/Y h:i:s A", $bean->purchaseDate)."
quoteID."\"/> quoteID."\">
".$bean->quantity."$" .$bean->purchasePrice."$".$quoteInfo[$bean->quoteID]."$". (($bean->purchasePrice) * ($bean->quantity))."$".($quoteInfo[$bean->quoteID] * ($bean->quantity)). ""); if ($gain > 0) { print ("".$gain.""); } else if ($gain < 0) { print ("".$gain.""); } else { print ("".$gain.""); } print(""); print("
"); print("holdingID."\">"); print("quantity."\">"); print("quoteID."\">"); print(""); print("
Totals$".$purchaseBasis. "$".$marketValue.""); $gain = $marketValue - $purchaseBasis; if ($gain < 0) { print ("$".$gain."
"); } ?>