Hi WL-Team,
I would like to exit half of the position if a certain condition is triggered. The second half of the position should be closed with the help of a TimeBasedExit. Unfortunately, the TimeBasedExit does not trigger.
I don't know where the error is. Can you help? Thanks. Here is the code:
CODE:
Please log in to see this code.
Size:
Color:
Hi Niels,
Splitting positions requires changing your strategy from single- to multi-position template. It doesn't look like your code is adjusted. On how to approach it please review your existing topic where you already asked a
very similar question (i.e. adding a time-based exit in a SplitPosition scenario):
SplitPosition endless loopMy reply was to avoid SplitPosition but i you wish to prefer the SplitPosition route this time, check it out from the horse's mouth:
1.
WealthScript Techniques | Splitting a Position, or
2. WealthScript Programming Guide > Techniques >
Splitting Positions
Size:
Color:
Hi Eugene, thank you very much. Problem resolved.
Best
Niels
Size:
Color:
Good to hear this. Glad to help you Niels.
Size:
Color: