I have a calculator for calculating trade fees for Bitcoin on exchanges (http://tradeli.st)
However I get asked a lot to add "shorting".
Basically, for a "long" position. I do this:
BUY 1 BTC @ $100 USD SELL .996 BTC @ $200 USD //buy fee is subtraced from sell amount
Then I take another .6% out of the sell trade to get total fees (1.2%). This all works fine and well.
But for shorting, (i'm not familiar with fee calculating on a short). The order is reversed:
SELL 1 BTC @ $200 USD //this is what user will enter to start BUY ? BTC @ $100 USD
The user enters "SELL 1 BTC @ $200". How should I be subtracting the fees on a short?