CumDown

Modified on 2009/10/22 17:38 by Administrator — Categorized as: Standard Indicators

Syntax

public CumDown(DataSeries source, int period, string description)
public static CumDown Series(DataSeries source, int period)
public static double Value(int bar, DataSeries source, int period)

Parameter Description

source Price series
period Indicator calculation period

Description

CumDown lets you test whether a specific number of consecutive bars have elapsed where the prices are less than their value a certain number of bars ago.

The CumUp and CumDown indicators are use to find setup conditions indicating overbought and oversold market conditions. They are designed to anticipate trend reversals. The CumUp looks for a number new high periods with only few low periods. The CumDown looks for a number of new low periods with only a few high periods.

In Candles sticks a new high or low is called Record Sessions. Candle theory, suggest if you have 8 to 10 near record sessions then the proceeding trend is due for a reversal. Record sessions count the bars slightly different to CumDown and CumUp.

Interpretation

Use CumDown to detect oversold conditions. In a similar manner, use CumUp to detect overbought conditions.

Calculation

CumDown is a running count of the number of bars whose Series value is below its delayed Series; in other words, Series offset forward by the Period. The count is reset to zero when the Series is above its offset series.

Example

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

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { // Thank you fundtimer public Color WS4ColorToNET( double WS4Color ) { return Color.FromArgb( (int)Math.Floor( ( WS4Color % 1000 ) / 100 * 28.4 ), (int)Math.Floor( ( WS4Color % 100 ) / 10 * 28.4 ), (int)Math.Floor( WS4Color % 10 * 28.4 ) ); } protected override void Execute() { // Highlight extreme moves down

double n = 0; for(int bar = 0; bar < Bars.Count; bar++) { n = Math.Truncate( CumDown.Series( Close, 3 )[bar] ); if( n > 9 ) n = 9; SetBarColor( bar, WS4ColorToNET( n*100 ) ); } } } }