Eugene,
I have an issue with the calculations of commissions within WLP, I did try to search the community with no success. Within my strategy code when I examine the Positions object I notice that the NetProfits field is actually the GrossProfit; we need to deduct the commissions from it to calculate the net profit. Further more, the entry and exit commissions fields are all zero (although I have set $8 for commissions from within the Preference menu). After researching this issue, I could not find a way from within my code to determine the value of the commissions. Of course the WLP Performance window calculates the right numbers by specifying the commissions in a separate field and adjusting the NetProfit. What am I missing?
-Best, J
Size:
Color:
This is by design. Take a look in the QuickRef (F11),
Position object, ExitCommission and/or EntryCommission,
Remarks. In short, these properties are unavailable when Strategy is executing and will work correctly in Extensions e.g.
Commission libraries.
Size:
Color:
Hello,
in the References I use IB bundled with 0.01 $ per share (see attachment 1).
But the strategy doesn't calculate any commissions, it calculates with 0 $ commissions in the Trades+-window (see attachment 2: 64.93$*404 - 64.08$*404 = 343.40$). And if I change the commissions the performance-results dont't change. I use the "Position Options" Position Sizer.
Do you know what is wrong?
Thanks
Marco
Size:
Color:
oh sorry, the checkmark wasn't set ... (see attachment 3)
Size:
Color:
Glad you've found out the reason.
Size:
Color:
When Preferences >>Commissions is unchecked both EntryCommission and ExitCommission become available to set and use in strategy. They are both set to calculate Net Profit in the published Historical Trades strategy. In fact, when positions are split commissions are split also. The system also adds actual exchange fees into the commission.
The QuickRef should be updated to reflect the ability to set commissions when Preferences>>Commission is unchecked..
Size:
Color:
Indeed it's so. Nice find. Thanks Kevin.
1. QuickRef
in PDF updated at the
Wiki FAQ >
How to print the PDF manual?2. QuickRef in WLP/D is to be updated when we get a chance.
Size:
Color: