MFEAsOfBarPercent returns NaN after SplitPosition
Author: Pablo4646
Creation Date: 7/14/2016 8:55 PM
profile picture

Pablo4646

#1
When do position split and try to receive MFEAsOfBarPercent one position return ok but another allways return NaN

Example
CODE:
Please log in to see this code.
profile picture

Eugene

#2
Congratulations, you've discovered a new bug in WealthScript! Not only MFEAsOfBarPercent but other similar properties too - such as MFEAsOfBar, MAEAsOfBarPercent, MAEAsOfBar, NetProfitAsOfBarPercent, NetProfitAsOfBar.

Nonetheless, the values are assigned correctly if you switch to a Raw Profit position sizing mode. At the moment I see no other workaround. Added to our Open Issues list.
profile picture

Pablo4646

#3
Pay your attention, please, that Combination strategies which include strategies with SplitPosition have a problem with calculating Allocation .
profile picture

Eugene

#4
Since this appears to be a different topic please start a new thread, providing a detailed problem description.