Hi everyone, I refer to the instruction “PositionPerf(n)” in PRT.
Here is what I found in PRT documentation:
“The instruction POSITIONPERF(n) returns: The performance (ratio gain/cost of the position) of the n-th last position closed if n>0 (not including brokerage fees) The performance (ratio gains/cost of the position) of the currently open position if n=0 (not including brokerage fees)”
The problem lies in the description “not including brokerage fees”. Let’s say I open a position and close it immediately at the exactly same median price level, the trade is actually a loss due to presence of spread. (I am trading on IG CFD FYI) As brokerage fees/ spread is not taken into account, am I correct that PositionPerf (1) would return 0? (idk if spread is counted as brokerage fees, please correct me if i am wrong).
The reason why i am asking this question is I want to increase my bet size only after a loss resulting from net negative difference of the median price level i opened and closed my position. (i.e. spreads/brokerage not taken into account).
Cheers
positionperf does not take spreads/brokerage fees into account.
Then it confuses me.
so it only considers the price on chart(median price) but not my actual trade price right?
POSITIONPERF will be calculated using the POSITIONPRICE so based on the opening price of your trade that you received from the broker. What it cannot put in the calculation is the price that you could close the trade at as you cannot know what the closing price is with spread and slippage at any moment in time until you have actually closed the trade and found out what price the broker gave you. So it is POSITIONPRICE compared to current mid spread price.
The above is an assumption rather than a proven theory!
I know I have coded the positionperf manually, and the code must be somewhere in the forums.. I’ll try to find it.
But if I remember correctly, POSITIONPERF is just the price variation between the opened candle price and the most recent one. It doesn’t include spread and/or commissions.
I think I have to make sure it’s meaning as it affects my position after losses.
It is not desirable to increase bet on false “loss”