Ai Analytix is an artificial intelligence, machine learning platform turning big data into information, then into actionable information.

Your one-stop destination for comprehensive company analysis, fundamental research, portfolio evaluation, screening tools and investor relations on over 1 100 African listed equities.


Enter Stock Name (Acronyms only)

">  
  




"; echo ""; echo "Error"; echo "Error: Received response code " . $responseCode . ""; echo ""; echo ""; exit(); } $content=file_get_contents($tableUrl); $jsonContent = json_decode($content); $metadataKey="Meta Data"; $timeSeriesKey="Time Series (Daily)"; $symbolKey="2. Symbol"; $timeKey="3. Last Refreshed"; $openKey="1. open"; $closeKey="4. close"; $volKey="5. volume"; $lowKey="3. low"; $highKey="2. high"; $symbol=""; $timestamp=""; $open=""; $close=""; $vol=""; $prevClose=""; $range=""; if(property_exists($jsonContent, "Error Message")) { echo ""; echo ""; echo ""; echo ""; echo ""; echo "
ErrorError: NO record has been found, please enter a valid symbol

"; exit(); } if($jsonContent->$metadataKey != null) { $symbol=$jsonContent->$metadataKey->$symbolKey; //$symbol=strtoupper($symbol); $timestamp=$jsonContent->$metadataKey->$timeKey; } if($jsonContent->$timeSeriesKey != null) { $count=0; foreach($jsonContent->$timeSeriesKey as $key=>$value) { if($count==0) { $open=$value->$openKey; $close=$value->$closeKey; $vol=$value->$volKey; $high=$value->$highKey; $low=$value->$lowKey; $range=$low . "-" . $high; $count=$count+1; } else if($count==1) { $prevClose=$value->$closeKey; $count=$count+1; } else if($count==2) { break; } } } echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $change=$close-$prevClose; $change=number_format((float)$change, 2, '.', ''); if($change>=0) { echo ""; } else { echo ""; } echo ""; echo ""; echo ""; $percentage=($change/$prevClose)*100; $percentage=round((float)$percentage, 2); if($change>=0) { echo ""; } else { echo ""; } echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $vol=number_format($vol); echo ""; echo ""; echo ""; echo ""; date_default_timezone_set("America/New_York"); $fullDate=date_create($timestamp); $formattedDate=date_format($fullDate,"Y-m-d"); echo ""; echo ""; echo ""; $spaces="        "; echo ""; echo ""; echo "
Stock Ticker Symbol" . $symbol . "
Close" . $close . "
Open" . $open . "
Previous Close" . $prevClose . "
Change" . $change . " " . $change . "
Change Percent" . $percentage . "% " . $percentage . "%
Day's Range" . $range . "
Volume" . $vol . "
Timestamp" . $formattedDate . "
IndicatorsPrice" . $spaces . "SMA" . $spaces . "EMA" . $spaces . "STOCH" . $spaces . "RSI" . $spaces . "ADX" . $spaces . "CCI" . $spaces . "BBANDS" . $spaces . "MACD
"; echo "


"; echo "
"; $volArray=[]; $dateArray=[]; $priceArray=[]; $today = new DateTime($formattedDate); foreach($jsonContent->$timeSeriesKey as $key=>$value) { $date=new DateTime($key); $diff=$today->diff($date); if($diff->days>181) { break; } $dateArray[]="\"" . $date->format('m/d') . "\""; $price=$value->$closeKey; $price=round((float)$price, 2); $priceArray[]=$price; $vol=$value->$volKey; $vol=$vol/1000000 ; $volArray[]=$vol; } $revDateArray=array_reverse($dateArray); $revVolArray=array_reverse($volArray); $revPriceArray=array_reverse($priceArray); $maxVol=max($volArray); $minPrice=min($priceArray); $dateCount=sizeof($revDateArray); if(($dateCount-1)%5 !=0) { $ind=($dateCount-1)%5; for($j=0;$j<$ind;$j++) { array_shift($revDateArray); array_shift($revPriceArray); array_shift($revVolArray); } } ?>
[porto_recent_posts items_desktop=”3″ cats=”13″]

Stay connected

Sign up for weekly tips, trends and investment opportunity in the African Market.