<?php

function fn_hmaximum_t($aql)
{
	$list = $aql->Consume(1);
	
	LiveValuesForPoints($list[0]->value);
	
	foreach($list[0]->value as $p)
	{				
		if (($p->history !== FALSE) && (count($p->history) > 0))
		{
			$mn = $p->history[0][1];
			
			foreach($p->history as $hst)
			{
				if ($hst[1] > $mn)
					$mn = $hst[1];				
			}
			$p->rawvalue = $mn;	
			$p->value = $mn;

			$p->history = FALSE;
		}
	}
		
	//$indx = round(count($lst)/2);
		
	array_push($aql->stack,$list[0]);
}

?>