PosSizer to limit entries per Tag
Author: hlh
Creation Date: 5/24/2012 11:17 AM
profile picture

hlh

#1
Sorry if this question was asked before, or, if there is already such a PosSizer around:

I, for example, would like to enter 15 pos max (a day) from within one strategy. The strategy might find entries based upon 3 different criteria. I'd now like to limit it to 5 pos per criteria, ideally by attaching a tag like "c1" "c2 "c3" or so. Positions then should be limited to max 5 tagged "c1", etc.

A workaround (in the strategy code, not to make a new PosSizer) which comes to my mind could be: To loop thru each positions per day (bar) after last symbol was processed, sort the "c's" by its prio and assign a 0% tag to each pos over 5 for each "c". Then using the Position Options PosSizer with the Tag option on, right? If this works, I guess I have to assign 6.66% to each of the first 5 pos of each "c", right?

Thanks!
profile picture

Eugene

#2
I think you could do it by assigning an incrementing Position.Priority (instead of .Tag) in conjunction with the Priority Adjustment PosSizer. The criteria groups make the incrementing priority fall into the PosSizer's priority bins.
profile picture

hlh

#3
Thanks, that seems right for this purpose. I even could reduce size on symbols being shown twice, I guess: if symbol XYZ would show up under condition "c1" and "c2", I could either enter it twice for 6.66% (1/15) for a total of 2/15 or then assign 3.33% ending up with 1/15.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).