The computation of the DV is very straightforward, so I'm not sure where the problem is.
values.DV = (values.TotalHits - values.TotalFA)/values.TotalBlocks
- values.TotalHits is the number of hits across all experimental blocks,
- values.TotalFA is the number of false alarms across all experimental blocks, and
- values.TotalBlocks is the number of experimental blocks run.
Hits can only occur in target trials. You have 5 target trials per experimental block, so max. 5 hits per experimental block, min. obviously 0.
False alarms can only occur in non-target trials. You have 10 non-target trials per experimental block, so worst case is 10 false alarms per block, best case is 0.
You run 12 experimental blocks, i.e. a total of 60 target trials and a total of 120 non-target trials. Best case is all hits & no false alarms, so
DV = (60 - 0) / 12 = 5
Worst case is no hits & all false alarms, so
DV = (0 - 120) / 12 = -10