Multi system signal selection: Using the best perfoming signal

About
I'm writing a "system of systems", the system is made up of different signals, each built for different market conditions (trending, mean reversion, etc).

I am building this for a single symbol, Intraday ES Futures.

Goal
I'd like the system to select the best signal based on the performance of each signal over N bars, not only in backtest, but also in live trading.

My question
Is there an AFL function or shortcut for tracking and ranking each signal? Or will I need to write this from scratch, creating equity curves and other derivatives for each individual signal?

Please note I have done a search
Yes, I can attempt to test for the current market conditions with some indicator, then use that as a PositionScore filter. An example of this can be found in this script which I found linked to a few similar (but different) questions, but this is not the same as using the best performing signal.

Another method
Another method would be the built in walk forward optimization. I could use this to select the best system. But this would not be a good solution for live trading intraday, unless I could somehow call the backtester from within my script after each bar? I'm not sure if that is possible.

Thank you for your time and insight.

1 Like

Have a look at the built-in Equity() function.

3 Likes

Thanks for the reply Steve, this solution looks to be for the backtesting only, and I can't think of a way that it could be used to track the stats of individual signals within a single strategy.

It does however seem to have a sliding window of N bars, which might be the reason for the suggestion?
But please do let me know if I'm missing something.

Thanks again

Equity() is a in-place single-security backtester-in-a-box, it actually performs backtest at the place of the call and returns equity so you can call it many times within one formula getting single-symbol performance of many symbols and many rules within single formula. It runs in ANY context, including chart, commentary, exploration, whatever else, not only during backtest.

5 Likes

Interesting! Thank you for the explanation. Can you please confirm that this is the correct usage?

ma1 = MA(C,12);
ma2 = MA(C,24);
ma3 = MA(C,48);

Buy  = Ref(C>ma1,-1);
Sell = Ref(C<ma1,-1);
sig1 = Equity();
Plot(sig1,"sig1",colorBlue);

Buy  = Ref(C>ma2,-1);
Sell = Ref(C<ma2,-1);
sig2 = Equity();
Plot(sig2,"sig2",colorGreen);

Buy  = Ref(C>ma3,-1);
Sell = Ref(C<ma3,-1);
sig3 = Equity();
Plot(sig3,"sig3",colorRed);

Am I right in believing each of these equities curves relate to just the signals directly before the call, but not before the previous Equity() call?

If so this should be exactly what I need!

Yes that is correct.

2 Likes

Thanks very much to the both of you, I am marking the first reply as a solution.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.