The easiest way to check is to run the ash function is_displayable(); it returns true for everything but quest items, which return false. There's also an is_tradeable() function, so if you wanted to find out if an item was non-tradeable, but not a quest item, you could use this:
Code:
boolean non_quest_no_trade(item it) {
if ( (!is_tradeable(it)) && is_displayable(it) ) return true;
return false;
}