Political parties contesting the national elections signed a pledge on Wednesday committing themselves to adhere to the Electoral Code of Conduct.