Purpose: To investigate the polarity effects caused by radiation induced currents, known also as Compton currents, in parallel plate ionization chambers. Compton currents arise as a result of charge imbalance due to charge deposition in electrodes during photon or electron beam irradiations. To allow for theoretical understanding of the effect, a modified user code COMPTON/EGSnrc was developed and used to study the effect in a phantom-embedded extrapolation chamber (PEEC). Method and Materials: The PEEC has a parallel-plate geometry with a variable electrode separation. The polarity effect of the PEEC was measured as a function of electrode separation, depth in phantom, and incident field size. Monte Carlo simulations using the COMPTON/EGSnrc user code were used to account for the charge entering into and exiting from the collecting electrode of the PEEC geometry, thereby yielding charge imbalance information. Results: The Compton current in the PEEC has a negligible dependence on electrode separation. In photon beams, the Compton currents with measurement depth exhibit a maximum at the surface and decrease with increasing depth to reach a minimum at the depth of dose maximum. The magnitude of the Compton current decreases with field size. In electron beams, the Compton current has a maximum positive value at the surface; decreases linearly with depth and becomes negative after a depth of about 0.2I50; then continues to decrease reaching a minimum at about 0.9I50; then increases rapidly to reach a zero value at RP. Conclusion: Compton currents are the dominant cause of the polarity effect in parallel-plate ionization chambers and their variation with depth, field size, electrode separation in photon and electron beams can be determined with out modified user code COMPTON/EGSnrc.