Up/Down and Intensity Day Summation Rank (UDIDSRI)

Modified on 2015/06/24 17:03 by Eugene — Categorized as: Community Indicators

Syntax


public UDIDSRI(DataSeries ds, int period, int power, int percentRankPeriod, int iteration, string description)
public static UDIDSRI(DataSeries ds, int period, int power, int percentRankPeriod, int iteration)

Parameter Description

dsDataSeries
periodIndicator lookback period
powerPower to multiply absolute returns (use 1st to 5th)
percentRankPeriodLookback period for Percent Rank (generally, use 50)
iterationOne of the two "iterations" of the indicator (use 1 or 2).

Description

Up/Down and Intensity Day Summation Rank (UDIDSRI) by qusma.com is an indicator described by its author as impressively good at picking out bottoms, and has very strong 1-day and acceptable medium-term predictive power.

First iteration:


Second iteration:


Interpretation

The case that presents the most interest is when UDIDSRI is equal to zero (i.e. the lowest value in 50 days), where 50 is the Percent Rank lookback period. Author stresses that since the the opposite approach (indicator hitting its maximum value) provides no edge either for mean reversion or trend following, it's useless for going short.

Example

This example illustrates plotting the UDIDSRI indicator, as well as buying a security after it hits 0, and exiting at a 10% trailing stop:

using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using WealthLab;
using WealthLab.Indicators;
using Community.Indicators;

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { UDIDSRI u = UDIDSRI.Series(Close,20,1,50,1); ChartPane up = CreatePane(30,true,true); PlotSeries(up,u,Color.FromArgb(255,255,0,0),LineStyle.Solid,2);

for(int bar = GetTradingLoopStartBar(1); bar < Bars.Count; bar++) { if (IsLastPositionActive) { Position p = LastPosition; double high = p.MFEAsOfBar(bar) / p.Shares + p.EntryPrice; double amount = high - high * (10 / 100.0d); SellAtTrailingStop(bar + 1, p, amount); } else { if( u[bar] == 0 ) BuyAtMarket(bar+1); } } } } }