I see it very simple:
1. verify all altitudes.
2. if there is any difference under 30, STOP.
3. verify if the 2 altitudes you have selected (under 30) meet also the time condition, under 4 minutes. if YES= LOCAL CONFLICT.
if NO verify also their destination. if opposite= OPPOSITE CONFLICT
if not opposite= nothing.