- ago
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!



1
281
10 Replies

Reply

Bookmark

Sort
- ago
#1
0
Cone8
 ( 6.71% )
- ago
#2
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.
0
- ago
#3
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.
0
Cone8
 ( 6.71% )
- ago
#4
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;
0
- ago
#5
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.
0
Glitch8
 ( 11.74% )
- ago
#6
I’m hesitant to make further additions to the already very complex MetaStrategy code.
0
- ago
#7
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).
1
Glitch8
 ( 11.74% )
- ago
#8
Let’s mark it a #FeatureRequest and get it into the wish list.
1
- ago
#9
Is there a way in C# to get signals of another child strategy?
0
Glitch8
 ( 11.74% )
- ago
#10
Mmm no not that I can think of.
0

Reply

Bookmark

Sort