Your interactive trading laboratory!
 • 
5 users online

QComposite
Latest Version 1.0.1
Released on Feb 26, 2019

Indicator


Targets QStudio only
$9.95
License Cost

The QComposite extension lets you create composite breadth indicators and aggregate indicators on any Universe, simply by configuring a Quantacula indicator. QComposite does the heavy lifting of synchronizing the data, performing the calculations, and keeping the composite indicator up to date as needed, all behind the scenes. Simply drag and drop a QComposite indicator, use it in a Building Block Model, or create one via C# code.

The extension contains the following new indicators. Each indicator can work on any Quantacula Studio Universe, and most have a lookback period parameter so you can obtain great flexibility in breadth indicator creation.

  • CompAdvDec - Number or percent of advancers, decliners, or unchanged symbols
  • CompAdvDecLine - Advance/Decline Line, cumulative total of advancers minus decliners
  • CompAdvDecRatio - Advance/Decline Ratio, advancers divided by decliners
  • CompAdvDecSpread - Advance/Decline Spread, advancers minus decliners
  • CompBreadthThrust - Moving average of advancers divided by moving average of advancers plus decliners
  • CompInd - Select any Quantacula indicator, returns the average indicator value across the Universe
  • CompInd% - Returns the percentage of symbols for which a selected indicator is above or below a specified value
  • CompMcClellan - McClellan Oscillator, 19 period EMA of advancers minus decliners divided by the 39 period EMA of same
  • CompNewHighLow - Number or percent of symbols that made new highs or lows, specify a lookback or across the entire history
  • CompTRIN - Arms Index (TRIN), Advancers over decliners divided by advancing volume over declining volume

QComposite

Using QComposite in C# Coded Models

The first parameter should be the BarHistory instance that was passed to your model. The second parameter is the name of the Universe to base the composite on, this is case sensitive. For composites based on indicators, create and pass an instance of the indicator to use. Here is an example of creating the CompInd aggregate indicator composite in code. It returns the average RSI(14) value for the symbols in the DOW 30 Universe.

using QuantaculaBacktest;
using QuantaculaCore;
using QuantaculaIndicators;
using QComposite;

namespace Quantacula
{
    public class MyModel : UserModelBase
    {
        //create indicators and other objects here, this is executed prior to the main trading loop
        public override void Initialize(BarHistory bars)
        {
		RSI rsi14 = new RSI(bars.Close, 14);
		compInd = new CompInd(bars, "DOW 30", rsi14);
		PlotIndicator(compInd);
        }

        //execute the strategy rules here, this is executed once for each bar in the backtest history
        public override void Execute(BarHistory bars, int idx)
        {
        }

	//declare private variables below
	private CompInd compInd;
    }
}
You'll have a 30 day trial license for this Extension, beginning the first time it loads in Quantacula Studio