I thought that this position sizer was not taking any trades at all on bar+1 if the alerts on bar were greater or less than the specified number. However this does not seem to be the case after a few backtests I run. Since there is no documentation on this one besides WL Wiki (Reject a Position when candidate trade count (number of Alerts) is above or below some Alert cutoff threshold). The backtest I refer to is at portfolio level.
Size:
Color:
PosSizers have a special property - CandidateCount - that returns a list of Position objects that represent the candidate Positions that are being sized on the current bar, at the point in time that the SizePosition method is being called.
Consequently, what this option does is reject a Position when this candidate trade count is above or below some specified cutoff.
Size:
Color:
I am afraid I cannot follow your explanation so I will attempt to form a simple example. Suppose that I have a dataset with 50 symbols. Out of these 50 symbols I get 1 alert for each symbol (50 alerts). All the alerts contain either limit or stop or market orders. In the Position sizer I have specified the alert cutoff at > 30 alerts. How many of the alerts will be rejected?
My guess would be all of them, correct?
Size:
Color:
All of them, right - and it indeed will work in a historical backtest.
The reason it appears not working to you is the Candidates list actually being empty when it comes to Alert sizing. Please create a support ticket, because I think that Wealth-Lab not populating the Candidates collection in PosSizers at Bars.Count sounds like a bug to me.
Size:
Color:
What happens in my case is that not all but a portion of the trades done in the raw profit mode become trades in the portfolio simulation mode.
I will create a support ticket as you suggested.
Size:
Color:
Currently, this bug (confirmed) makes the PosSizer always compare a threshold with 0 (rather than the actual Alerts count).
Size:
Color:
I would like to clarify. In my case, Reject on Alerts does not work properly.
If alerts are just Limit Orders, the Position Options takes into consideration just those alerts that have been "taken" the next day, but it does not take into consideration the number of Candidates from the previous day.
For example, if I set Reject on Alerts < 3, the Position Sizer will take trades only on those days, which at least 3 Limits were reached, but in the case if there were 10 Candidates and only 1 or 2 reached the limit the Position Sizer will not take any of those 2 trades, which is wrong, because there were 10 Alerts the day before.
Is it possible to fix it so Position Sizer looks on the Candidates but not on the actual trades that have been taken?
Size:
Color:
There's nothing to fix in the PosSizer itself. A bug in 6.3 has been found and was reflected on the
Open Issues list:
(62853) In PosSizers, the Candidates list is empty for Alert sizing
As I mentioned above, this bug prevents PosSizers from operating with Candidate trades correctly when it comes to sizing for Alerts (the historical trades aren't affected). Consequently, the PosSizer option will start working again by itself when the Wealth-Lab bug is fixed. At this time, ETA is not available but Fidelity is informed.
Size:
Color:
UPDATE:
This bug will be fixed in WLD 6.9.24. No ETA at the moment as we're still trying to fix an issue with this build.
Size:
Color: