Using martingale methods, we derive a set of theorems of boundary crossing probabilities for a Brownian motion with different kinds of stochastic boundaries, in particular compound Poisson process boundaries. We present both the numerical results and simulation experiments. The paper is motivated by limits on exposure of UK banks set by CHAPS. The central and participating banks are interested in the probability that the limits are exceeded. The problem can be reduced to the calculation of the boundary crossing probability from a Brownian motion with stochastic boundaries. Boundary crossing problems are also very popular in many fields of statistics.