BressertDSS

Modified on 2018/03/31 19:49 by Eugene — Categorized as: Community Indicators

Syntax


public public BressertDSS(Bars bars, int periodStochastic, int periodEMA, string description)
public static BressertDSS Series(Bars bars, int periodStochastic, int periodEMA)

Parameter Description

BarsA Bars object
periodStochasticEMA lookback period
periodEMAStochastic lookback period

Note: due to a labeling bug in the indicator, the natural order of parameters is reversed: the first parameter is the smoothing (EMA) period and the second is the Stochastic lookback.

Description

The Double Smoothed Stochastic developed by Walter Bressert. Its calculation algorithm is similar to that of Stochastic indicator.

Calculation

Image

Interpretation

The value above 80 signifies an overbought condition while the value below 20 indicates an oversold condition. The application of the DSS is comparable with that of Stochastic indicator. A rise of the DSS above its center line may be viewed as bullish, and vice versa.

Example


using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using WealthLab;
using WealthLab.Indicators;
using Community.Indicators; /* Requires installation of Community Indicators extension */

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { //A system based on BressertDSS Levels var r = 13; var n = 8; var b = BressertDSS.Series(Bars, r, n); ChartPane bp = CreatePane(30,false,true); PlotSeries(bp,b,Color.CadetBlue,LineStyle.Solid,2); DrawHorzLine(bp,20,Color.Red,LineStyle.Dashed,1); DrawHorzLine(bp,80,Color.Blue,LineStyle.Dashed,1); for(int bar = GetTradingLoopStartBar(r); bar < Bars.Count; bar++) { if( CrossUnder( bar, b, 20 ) ) BuyAtMarket( bar+1 ); if ( ( ActivePositions.Count > 0 ) && CrossOver( bar, b, 20 ) ) { for( int p = ActivePositions.Count - 1; p > -1 ; p-- ) SellAtMarket( bar+1, ActivePositions[p] ); } } } } }