How to pass parameters to PosSizer?
Author: Supersol
Creation Date: 11/7/2015 3:15 PM
profile picture

Supersol

#1
Hi!

We would like to implement our own pos sizer and need to read a variable out from wealth lab but dont know how we can do this - or if it is even possible.

CODE:
Please log in to see this code.


we know that we can set the riskStopLevel in wealth lab

CODE:
Please log in to see this code.


which is then the parameter of the SizePosition double riskStopLevel. Is it possible to add more parameters?
profile picture

Eugene

#2
Hi,

Have you tried following a suggestion from the Wiki FAQ? There are two, a more general one for backtesting and a modification of the technique for alerts:

How to pass a value from Strategy to PosSizer for Alert sizing?

As exemplified there, you can pass virtually anything from a simple variable to custom object of any complexity (that would have to be unboxed on the receiving end - i.e. the PosSizer).
profile picture

Supersol

#3
thx
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).