How to set up multi-position
Author: lookingbackon
Creation Date: 7/24/2014 11:20 PM
profile picture

lookingbackon

#1
Hello,

Would like to have your suggesion on the multi-position setup.
The idea is roughly like this :

bool A
bool B
If A BuyAtMarket for the first position (10% of the starting capital)
if A&&B BuyAtMarket for the second position (10% of the starting capital)
......
Positions.Count <=4

My question is whether this idea can be realized ONLY with selecting a specific PosSizer option or has to be coded in the strategy.
Thanks a lot
profile picture

Eugene

#2
Hello,

Assuming each position gets the same amount of capital, there's no need in a PosSizer. To limit the number of total positions, use ActivePositions.Count:

CODE:
Please log in to see this code.

See the WealthScript Programming Guide > Programming Trading Strategies > Multi-Position Strategies > MP Strategy Template for example use.
profile picture

lookingbackon

#3
Hi Eugene,

Thanks for the help. It's clear now.

Nice weekend
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).