is it possible to save dynamic data into an array?
// functions
// creates the function
function calculatePIPS($Exit, $Entry) {
return $Exit - $Entry;
}
function outcome($PIPS, $SIZE) {
if($PIPS > "0") { return '+' . $PIPS * "10000" * $SIZE ; }
elseif($PIPS <= "0") { return '-' . $PIPS * "-1" * "10000" * $SIZE ; }
}
[I]// acumilation of pips from id to id
function lac($last, $current) {
if ($last != $current) { return $current ; }
} [/I]
// assigns the variables
$valExit = $row_rsClosed['col_exit'];
$valEntry = $row_rsClosed['col_entry'];
$valSize = $row_rsClosed['col_epq'];
// calculates the total number of pips
$valPIPS = calculatePIPS($valExit,$valEntry);
// double checks if the val of pips is negative
$total = outcome($valPIPS, $valSize);
echo $total;