We already had this topic in another thread, but i just wanted to demonstrate this "bug" and talk about a solution to enhance this still wonderful piece of software.
- MetaStrategy with max 1 position per symbol
- 3 child strategies (same symbol) with different entry limits, weighted the lower the better, close same bar at market close
As the results show, the entry logic (which one of the 3 entries to take) just takes the Transaction.Weight into account. This leads to always taking the lowest possible entry on this day, which is obviously not achievable while live trading (without predicting the future).
Possible solution if multiple orders for the same symbol occur:
Add MetaStrategy.Weight, which weights all signals and filters out all signals for the same symbol minus Max Open Per Symbol (defined in MetaStrategy or in the object in all child strategies).
I am curious to hear what you think!
- MetaStrategy with max 1 position per symbol
- 3 child strategies (same symbol) with different entry limits, weighted the lower the better, close same bar at market close
As the results show, the entry logic (which one of the 3 entries to take) just takes the Transaction.Weight into account. This leads to always taking the lowest possible entry on this day, which is obviously not achievable while live trading (without predicting the future).
Possible solution if multiple orders for the same symbol occur:
Add MetaStrategy.Weight, which weights all signals and filters out all signals for the same symbol minus Max Open Per Symbol (defined in MetaStrategy or in the object in all child strategies).
I am curious to hear what you think!
Rename
You didn't turn on "Inter-Strategy Signal Pruning" (ISSP), but it seems that it wouldn't have made any difference at the moment since it eliminates signals only when an open positions already exists.
I'm not the "MetaStrategy guy" but it seems to me that ISSP should also prune limit and stop entry orders such that the most conservative signal (the one that would be hit first) is the one signal per symbol. And, of course a Market entry order in the mix would also have priority.
I'm not the "MetaStrategy guy" but it seems to me that ISSP should also prune limit and stop entry orders such that the most conservative signal (the one that would be hit first) is the one signal per symbol. And, of course a Market entry order in the mix would also have priority.
QUOTE:
I'm not the "MetaStrategy guy" but it seems to me that ISSP should also prune limit and stop entry orders such that the most conservative signal (the one that would be hit first) is the one signal per symbol. And, of course a Market entry order in the mix would also have priority.
Weighting the most conservative signal is also a good (and more simple) idea!
@Glitch? :-)
QUOTE:
You didn't turn on "Inter-Strategy Signal Pruning" (ISSP), but it seems that it wouldn't have made any difference at the moment since it eliminates signals only when an open positions already exists.
There also should be an option to get the open positions of the broker, not the backtest, because if NSF > 0, ISSP blocks entries for symbols which have no "real" open position.
By the way, you can "fix" that priority right now by assigning it yourself to pick the highest limit price like this (assumes Parameters[0].AsDouble as the subtrahend from the closing price) -
CODE:
double limit = bars.Close[idx] - Parameters[0].AsDouble; Transaction t = PlaceTrade(bars, TransactionType.Buy, OrderType.Limit, limit); t.Weight = limit;
QUOTE:
By the way, you can "fix" that priority right now by assigning it yourself to pick the highest limit price like this (assumes Parameters[0].AsDouble as the subtrahend from the closing price) -
t.Weight is also used for sorting and filtering entries (Max Entry Signals >0). That's why I was suggesting MetaStrategy.Weight.
I’m hesitant to make further additions to the already very complex MetaStrategy code.
QUOTE:
I’m hesitant to make further additions to the already very complex MetaStrategy code.
What about the idea from Cone? Just prioritise the most conservative entry?
MetaStrategy is one of the most important feature of this software (certainly not just for me).
Let’s mark it a #FeatureRequest and get it into the wish list.
Is there a way in C# to get signals of another child strategy?
Mmm no not that I can think of.
Your Response
Post
Edit Post
Login is required