Failover with two redundant link

I have RB450G, and internet connection from my upstream provider via FIBER wire with one public IP on Port-1. As a backup they have provided me with second fiber which I have inserted in rb450g port 2. Right now I have added same ip on both interface and keep one interface disable. When primary fiber goes down, i disable IP on interface 1, and ENABLE IP on interface 2.

How can I automate it? If the provider had given me separate ips or separate gateways I could do it with the script.

Any Advise?

It can be done by different route distances only with checking the gateway by the routing rules. No need for script.

http://wiki.mikrotik.com/wiki/Manual:Interface/VRRP but one more Mikrotik router is needed.
Or http://wiki.mikrotik.com/wiki/Manual:Interface/Bonding but for some modes additional actions from provider side is needed.
PS: simplest way is to have two default gateways with different metrics - 1 and 2 but via different interfaces:

IP%interface1
IP%interface2

You can bridge interfaces and put your public IP on the bridge, your service provider probably run RSTP… So with default setup it should work.