Hi Eugene,
I'm having troubles with splitting positions in my strategy. When I run on a single symbol, everything works ok. But when I test against DOW30 there is an odd behave. Some trades are handled ok, some trades will not get splitted and some trades will be splitted and the remaining trade is gone (but ActivePositions.Count is >0 like I can see on the color of the chart!!).
To reproduce I attached a simplified script. It tries to go long on every 17th bar and short on every 23rd bar. The chart will be colored if there are ActivePositions depending on long (green) and short (pink). On the 3rd day the position shoud get splitted, and on the 6th day the position should be closed. I've also search the wiki and kb and found a similar example (
http://www2.wealth-lab.com/WL5WIKI/kbSplitPosition.ashx?HL=splitposition) but I can't get it work correctly. What I'm doning wrong?
I'm running with position size 19.5% equity
CODE:
Please log in to see this code.
Size:
Color:
Size:
Color:
Hi Eugene!
I just try to follow the conversation in that thread, but it's a little bit confusing and not discussed to end (in my oppinion). Do I need the pyramiding possizer? If yes, which settings? And how do I split?
Size:
Color:
Erich,
I'm sorry but at the moment I couldn't offer more ideas.
Size:
Color:
Am I right to call it a bug in WL?
Size:
Color:
What is "it" exactly?
The "remaining trade is gone" phenomenon, if I understood you correctly, is expected. In portfolio simulation, any part of the combination can be left out due to capital constraints. Cone explained what's happening in his post dated 12/28/2010 5:00 PM.
Size:
Color:
Eugene
QUOTE:
What is "it" exactly?
"it" means in my oppinion that something does not work as expected.
When you split a position in real trading life, you will sell half of the position - you may not run into a problem of equity.
I agree with you to the equity problem in scale in, but not in splitting.
"it" means for me: The internal algorithm of calculating and handling the split - it's not working as described and there is also no hint in the documentation not to use in portfoliotest. So therefor for me it's simply a bug.
Do you have any plans to fix this behave in the future?
Size:
Color:
Please create a support ticket for tracking the issue. Include the link to this thread or even better,
this one.
Size:
Color: