Position size with multiple models

SkylineR34

Newbie
Messages
1
Likes
0
Hi!

I am having trouble with TS200i not giving the right position size when using multiple models.

As an example. Say you have four underlying models on the same asset. These models are suppose to trigger so that you can have 5 "states" 100% long, 50% long, neutral, 50% short and 100% short. When I program this for instance in Matlab, this is no problem as the positions of each underlying model is accumulated up in the total model. When I try this in TS I get a problem.

For example if all models are long, and one model triggers short, I get a position of 25% long because a long order neutralizes the short position of the other models and then enters the long position of the one triggers. This can of course be solved by using ExitShort order of 50% getting the disired result in this case. The problem then becomes knowing what kind of order type to use at any given time. The problem here comes when you have more than one order for the next bar and the position is evaluated at the end of each bar. Say you have a position of 50% long (3 long models and one short) then you have two short orders for the next bar to trigger at some level. One of the orders should use the exitlong order, and the other a sell order. The problem I get is making this work.... (In the extreme case one may be partially filled with multiple orders making the two values intertwene, what to do...) One solution may be to have four graphs with each model, hide these and show only one graph with the accumulated positions. This may work if one can connect the graph to the tracking center, but I have not found a way to do this.

I have tried the solution of making a summation model in EasyLanguage using the "IncludeSignal" formula, but I get the same problem as mentioned above.

Any help or ideas will be greatly appreciated.
 
Top