Available transmission capacity(ATC) is one of the key indexes of power system security. Combining security-constrained economic dispatch(SCED) with continuous power flow(CPF), a new algorithm of ATC calculation in a power market environment is proposed. In the process of CPF calculation, minimizing electricity purchasing cost is taken as the optimization target in each iteration step, and maximizing line power flow as CPF calculating object. While having the advantages of conventional CPF calculation method, this algorithm can also optimize the active power through the optimization process introduced to it. At the same time, it has good convergence and computing speed, and the calculation results are closer to the actual system operation situation. It helps guide the power transactions. Finally, the effectiveness of the algorithm has been verified by practical example.