Given a simple graph $G$ with $m$ edges, we are looking for a bijection $f$ from $E(G)$ to the integer set $\{ k+1,k+2,\ldots,k+m \}$ such that the vertex sum of each vertex $v$, $\phi(v)$, defined as the sum of $f(e)$ over all edges $e$ incident to $v$ is unique. If such a bijection $f$ exists, we say $G$ is $k$-shifted antimagic. This is a generalization of the antimagic graphs proposed by Hartsfield and Ringel [7]. In this paper, we proved that every tree of diameter four or five, except for two previous known examples, is $k$-shifted antimagic for every integer $k$.