-
Finds the middle value of a table of values. If there is an even number of elements, takes the average of the 2 middle values.
Custom Command Dependencies:
NoneTest Code:
if not Load('done', false) then local table = Grab(ClosePrices(), 0, 9) Log(' ') Log(table) Log('Unsorted Table:') Log(' ') Log(ArraySort(table)) Log('Sorted Table:') Log(' ') local median = CC_Median(table) Log(median) Log('Median Value:') Log(' ') Save('done', true) end