Thanks for the query.
there will be increased blood supply to local organs. And when friction occurs during intercourse there is possibility of spotting.
And also there will be increased mucus discharge during intercourse, so when this spotting gets mixed with vaginal discharge
that orange colored mucus might have formed.
If you do not have any pain abdomen, bleeding etc no need to worry.
As you are having history of miscarriage
better to avoid intercourse in the first trimester(till 12 completed weeks).