[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamic Breakout System



PureBytes Links

Trading Reference Links

It looks like you're working on the original
DBS code written by George Pruitt and published
in Futures magazine.  Take a quick glance at
Stridsman p. 98 and it's easily confirmed.

Your code is missing one statement, and another
statement is wrong.  The missing statement is

    OldVarA = VarA;

and the wrong statement is

    VarA = VarA * (1 + ZDelta);

Trace through Stridsman's book and you'll find
the problems.  You'll find that the two pieces
of code employ different variable names but identical
statements and order:

Pruitt         Stridsman
===========================
VarA           EntryLB
OldVarA       YestEntryLB


"Trey Johnson" <dickjohnson3@xxxxxxxxxxxxxx> writes

Hello List,
        As I was re-working through the DBS system by Thomas Stridsman,
I noticed what seems to be an error or I guess I should say it doesn't
seem to work as he intended. The error seems to be in the line: VarA =
VarA * (1 + ZDelta);
If you bracket out the rest of the code and plot VarA, it seems to
converge towards zero over time. This in turn seems to cause VarA to
become a fixed look-back period at some point in time as opposed to a
variable look-back. Has anyone else noticed this? Does anyone have any
suggestions for a fix? It seems that it may need a beg/end condition or
something along those lines.
Thanks,
Trey


Inputs: Ceil(60), Flr(20);

Vars: X(0), ZDelta(0), OldVarA(0), VarA(0), VarB(0), Y(0),
EntryL(0), EntryS(0), ExitL(0), ExitS(0);

Y = X;
X = Stddev(Close, 30);
ZDelta = (X - Y) / X;

If CurrentBar = 1 then
        VarA = 20;

VarA = VarA * (1 + ZDelta);
VarA = MaxList(VarA, Flr);
VarA = MinList(VarA, Ceil);
VarB = VarA * 0.5;


EntryL = Highest(High, VarA);
EntryS = Lowest(Low, VarA);
ExitL = Lowest(Low, VarB);
ExitS = Highest(High, VarB);

Plot1(EntryL, "EntryL");
Plot2(EntryS, "EntryS");
Plot3(ExitL, "ExitL");
Plot4(ExitS, "ExitS");