for federal tax purposes, moving from one state to another has not impact on your taxes
for state tax purposes, fill out the tax forms for the state you moved from first and then complete the forms for the state you now live in..... the state forms themselves will resolve your question on capital gains.