with prospecting, you have a 4% chance of getting each variation of rare gem, 18% chance of getting an uncommon gem.
Take the value of each uncommon and common gem as you see it, whatever your doing with them, crafting, cutting, vendoring, DEing, whatever option is highest, that value. multiply it by its respecting % of either .04 or .18. Add up all the results, that is the value of 5 elementium ore. multiply by 4 to get the simple value of a stack and the price at which you must purchase at or below to make a profit.
As the values of uncommon and common gems change for market movement, rerun the calculation and get your new elementium threshhold.
you should have already done this before you started buying stuff