Optimizing a strategy using aggregations
What are aggregations?
Aggregations are quite simply different timeframes. For example: we trade on a 5 minute chart but use an MACD indicator on a 15 minute chart to filter our tradingsignals. This approach permits filtering or trading through different timeframes.
In this example we develop a strategy on the German Bund future (FGBL). The bund future is quite popular with investors trading on the long term intrest rates and is not too volatile.
In the setup of our strategy we are considering 3 indicators:
- The Dynamic RSI indicating oversold & overbought levels;
- The Channel Breakout showing actual breakout movements;
- The Supertrend indicator closing the position when there is a trend reversal.
First step: loading data
We load the future contract with 300 days of 5 minute data.

We also place 2 timefilters:
- From 00:00 until 08:05 flat, which means no positions.
- From 21:55 until 23:59: flat no positions.
So trading will just be possible between 08:05 and 21:55.
Second step: installing the indicator
We install the Dynamic RSI indicator. If the Dynamic RSI is not in your platform, please install, as described here.
Once installed, right-click on Edit Interpretation in de DesignerBar. Change the interpretation of the indicator as follows:
The Dynamic RSI indicates an oversold level when leaving the Bollinger Band downwards and gives a Buy signal when reentering them. Step 7 is given the value 100, indicating that if the sentiment equals 100, a Long position is opened.
In the current configuration we open a position if the market was oversold of overbought and rebounds in the opposite direction.
An oversold level is in place when the Dynamic RSI leaves the Bollinger Bands upwards and the Short or Sell signal is given when the RSI reenters the Bollinger Bands. See step 3 in the interpretation of the indicator.
The aggregation of the Dynamic RSI is on 6 x 5 minutes. Hence we are trading on a 30 minutes chart.
Third step: filtering signals
In order to reduce a number of false signals we add the Channel Breakout indicator but this time as a filter. The Channel Breakout indicator signals a positive trend if the futures breaks out by reaching new highs and is reaching new lows when trending down.
As we have placed the Breakout indicator on a 3 x 5 minutes aggregation, the Buy and Sell signals on the Dynamic RSI (on a 6 x 5 minutes) scale will only be accepted when there is a breakout going on the 15 minutes timescale. This acts as a kind of confirmation of the trade.
In this example we enter a long position on the Bund as there was an oversold situation on the 30 minutes (6x5) scale and there is a upward breakout on the 15 minutes (3x5) scale.
Fourth step: placing stops
Placing a stop in a strategy remains essential. In this configuration we use the SuperTrend indicator as a stop. The Supertrend is trendindicator.
We use aggregation 3 x 5. So, if we have a position short and the trend on a 15 minutes scale is reversing upwards, then the position will be stopped out.
Fifth step: placing a target
Technical indicators such as the Supertrend are lagging. So frequently the position will be held for too long. In order to exit the trade a little sooner we place a Profit Target stop.
The Profit Target is put at 3 times the ATR. The ATR or Average True Range measures the volatility of the Bund future over 20 periods of 5 minutes. 20 is also called the ATR Span.
So the position will be sold when a target of 3 x ATR is reached. Suppose the ATR is 0.10 points and the entry is 122.50 then the position will be sold when reaching 122.80.
Sixth step: evaluation the strategy
Below the equity curve, illustrating a nice gradual build-up of profits.

The report hereunder and attached to this article show a profitability ratio of 72,92% and a profit factor of 2,80. This means that the average profit is 2.8 times more important than the average loss.

The buildup of this strategy, done without any optimisation, shows that by simply using aggregation and applying other timeframes can largely modify the profitability of a strategy.
| Attachment | Size |
|---|---|
| DynamicRSI_report.htm | 25.75 KB |
| DynRSIAggregatedChecksum.dys | 2.08 KB |



