A correct way of checking when a position becomes profitable

 

Hello,


I want to update (trail) stop loss level only if a position is profitable. Is the below expression a correct way of detecting this condition?


OrderProfit() - OrderCommission() + OrderSwap() > 0


Does the commission returned by this function correspond to one way trade or it also accounts for the cost of closing the position? Should the above expression be replaced with:


OrderProfit() - 2 * OrderCommission() + OrderSwap() > 0


(This assumes that the cost associated with closing the position is the same as of opening the position).


Thanks,

Lukasz

 
OrderProfit() + OrderCommission() + OrderSwap() > 0
 
Russell:

Thanks Russell.


Actually, I dropped the idea of accounting for commission and swap when checking if a trailing stop should be applied to a stop level. For example, for a buy order only Bid and order open price is considered:


Bid - order open price > trailing stop


This assumes that the trader accounted for commission and swap when choosing the trailing stop level.


Is this approach reasonable? Initially, I thought about factoring commission and swap into the above formula, i.e.:


Bid - order open price - commission (in points) + swap (in points) > trailing stop


Which approach makes more sense?


Lukasz

Reason: