Calculate the true range using SQL Server 2014
问题 I am trying to calculate the true range from the table below. TIME BID-OPEN BID-HIGH BID-LOW BID-CLOSE 1993-05-09 21:00:00.000 1.5786 1.5786 1.5311 1.5346 1993-05-10 21:00:00.000 1.5346 1.5551 1.5326 1.5391 1993-05-11 21:00:00.000 1.5391 1.5521 1.5299 1.5306 1993-05-12 21:00:00.000 1.5306 1.5451 1.5106 1.5256 1993-05-13 21:00:00.000 1.5256 1.5416 1.5211 1.5361 So far I have managed to do this: SELECT t.Time, Round([BID-HIGH]-[BID-LOW],5) AS [H-L], Abs(Round([BID-HIGH]-[prev_BID-CLOSE],5)) AS