Walter Bressert indicator
Forums › ProRealTime English forum › ProBuilder support › Walter Bressert indicator
- This topic has 6 replies, 2 voices, and was last updated 5 years ago by renzocarioca.
-
-
07/29/2019 at 6:33 PM #103735
Dear generous programming souls,
here is the Walter Bressert Indicator which probably can be of great interest to many traders.
The DSS Bressert indicator was developed by Walter Bressert. It is smoother than a regular stochastic indicator but can be interpreted in generally the same way with 30 considered oversold and 70 considered overbought.
The calculations start with a normal raw stochastic. This stochastic is smoothed by an exponential moving averages before another raw stochastic is taken of the result. Then a second exponential moving average of the same period is applied to this second stochastic.
its coding is available at https://ctrader.com/algos/indicators/show/1224 if someone is able to convert it for Protrader
(another address is this one: https://www.tradingview.com/script/W9J3VZUu-DSS-Bressert-Double-Smoothed-Stochastic/ )
thank you
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
using
System;
using
cAlgo.API;
using
cAlgo.API.Internals;
using
cAlgo.API.Indicators;
namespace
cAlgo
{
[Levels(0, 20, 40, 60, 80, 100)]
[Indicator(IsOverlay =
false
, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None, ScalePrecision = 2)]
public
class
DSSBressert : Indicator
{
[Parameter(
"Stochastic period"
, DefaultValue = 13)]
public
int
Stochastic_Period {
get
;
set
; }
[Parameter(
"EMA period"
, DefaultValue = 8)]
public
int
EMA_Period {
get
;
set
; }
[Parameter(
"WMA period"
, DefaultValue = 8)]
public
int
WMA_Period {
get
;
set
; }
[Output(
"DSS"
, Color = Colors.White, Thickness = 1)]
public
IndicatorDataSeries DSS {
get
;
set
; }
[Output(
"DSS Up"
, Color = Colors.DodgerBlue, PlotType = PlotType.Points, Thickness = 5)]
public
IndicatorDataSeries DSS_Up {
get
;
set
; }
[Output(
"DSS Down"
, Color = Colors.Red, PlotType = PlotType.Points, Thickness = 5)]
public
IndicatorDataSeries DSS_Down {
get
;
set
; }
[Output(
"WMA"
, Color = Colors.Gold, Thickness = 1)]
public
IndicatorDataSeries WmaResult {
get
;
set
; }
[Output(
"L1"
, LineStyle = LineStyle.Solid, Color = Colors.LightGray)]
public
IndicatorDataSeries L1 {
get
;
set
; }
[Output(
"L2"
, LineStyle = LineStyle.DotsRare, Color = Colors.LightGray)]
public
IndicatorDataSeries L2 {
get
;
set
; }
[Output(
"L3"
, LineStyle = LineStyle.DotsRare, Color = Colors.LightGray)]
public
IndicatorDataSeries L3 {
get
;
set
; }
[Output(
"L4"
, LineStyle = LineStyle.Solid, Color = Colors.LightGray)]
public
IndicatorDataSeries L4 {
get
;
set
; }
private
double
Ln = 0;
private
double
Hn = 0;
private
double
LXn = 0;
private
double
HXn = 0;
private
double
alpha = 0;
private
IndicatorDataSeries mit;
private
WeightedMovingAverage WMA;
protected
override
void
Initialize()
{
mit = CreateDataSeries();
alpha = 2.0 / (1.0 + EMA_Period);
WMA = Indicators.WeightedMovingAverage(DSS, WMA_Period);
}
public
override
void
Calculate(
int
index)
{
L1[index] = 20;
L2[index] = 40;
L3[index] = 60;
L4[index] = 80;
if
(
double
.IsNaN(mit[index - 1]))
{
mit[index - 1] = 0;
}
if
(
double
.IsNaN(DSS[index - 1]))
{
07/30/2019 at 7:22 AM #103751Did you try this version found in forums:
https://www.prorealcode.com/topic/double-smoothed-stochastic/
If it is not the same I will translate the code you have posted 🙂
1 user thanked author for this post.
07/30/2019 at 3:40 PM #103816to be sincere I am not an expert. So looking through the link you provided me and the one I sent…. it looks different. In addition… the output is really different.
If you can translate it, it would be very kind of you. I think that quire a few users will end up using it!
thank you
07/30/2019 at 3:46 PM #103821ok, will code it asap!
1 user thanked author for this post.
08/01/2019 at 12:35 PM #103971will be very welcome and help Prorealtime compete with other platforms
08/01/2019 at 12:56 PM #103976The DSS Bressert Stochastic oscillator is now available here: DSS Bressert (Double Smoothed Stochastic)
Same as the one from TV.
1 user thanked author for this post.
08/01/2019 at 1:12 PM #103978thanks very much. I will definitively share this info with quite a few tarders and investors friends
-
AuthorPosts
Find exclusive trading pro-tools on