Even if the U.S. and China come to some sort of an agreement at this week's G-20 summit, the world's two largest economies will still be fighting for much longer, conservative economics writer Stephen Moore told CNBC on Wednesday.

"This trade dispute isn't going to be solved in the next year or two. This is going to be the epic battle of our times," said Moore, who withdrew his name from President Donald Trump's consideration in May for a nomination to the Federal Reserve Board. "It's going to go on for 10 or 15 years."

Washington and Beijing have been engaged in a trade war for nearly a year, and the two countries have stepped up retaliatory efforts on one another in the past month.

Trump and President Xi Jinping are set to meet at the G-20 summit on Saturday after trade talks stalled. Treasury Secretary Steven Mnuchin told CNBC earlier Wednesday he's confident that the U.S. and China can come to an agreement.

"We were about 90% of the way there [with a deal] and I think there's a path to complete this," Mnuchin told CNBC's Hadley Gamble in Manama, Bahrain.

However, the two nations still haven't reached an end goal and there's a chance negotiations could fail. Moore, chief economist for the Heritage Foundation, stressed that there's a difference between reaching a deal and almost reaching a deal.

"That's what tripped them up last time," Moore said. "I wouldn't overreact to it," referring to Mnuchin's comments.

But if positive news comes out of this week's trade talks, Moore said he expects the economy and U.S. markets to rise, with the Dow possibly reaching 30,000 points — it currently sits just above 26,500 points.