There are two ways you can set your IDX link to only display active listings.
Option 1
When you setup a saved search, select Active under the Status field. If the status field is not available, go to Add a field to the search box and type in Status.
Option 2
When you post your link to your website, add the Smart Frame API parameter to the end of the link. Like this, &status=A:
https://link.flexmls.com/xxxxxxxx,x&status=A
This will tell the link to automatically select Active under the Status field.