How to redistribute OSPF Metric to BGP Local Pref.

Hello
mikrotik-bgp.jpg
There is a large network on OSPF. There are two Mikrotik (VPN1 & VPN2) as VPN servers for remote offices (Branch) using BGP. Tell me how to transfer from OSPF to BGP OSPF Metric ?
By default, it is passed with a value of 100 BGP Local Pref., and I have to manually fix the filter on VPN1 & VPN2 for the desired networks to 300.

This is how it looks on MT3
bgp.jpg
How to change the Local Pref value automatically depending on OSPF Metric ?

RouterOS v6 does not have such functionality.