A barrier option is a financial derivative which includes an activation (or deactivation) clause within a standard vanilla option. For instance, a copper mining company could secure to sell in at least K dollars each ton of copper during the next year, by buying M European put options. However, it could purchase a less expensive derivative (a barrier option) which includes a clause which deactives the contract if ever the price of copper is below B dollars (for B<K) during the life of the contract. In practice, such barrier does not have to remain constant during the life of the contract. However, pricing a barrier derivative is only known for barriers that are represented by linear, quadratic, and square root functions. In this work we propose a new methodology for pricing barrier options that include a larger family of barriers not previously studied in the literature.