byakuren81,

it calculates correctly:

max(high[0],close[1]) - min(low[0],close[1])

the manual was misleading.