Peel the oranges, removing all the white pith and pips, and chop. Peel, core and chop the apples and peel and chop the onion. Chop the ginger and chillies. Put all the ingredients into a pan and simmer gently until thick, about 1 hour. Pour into hot sterilized jars and seal.