Page 1 of 1

DAPD Bands

Posted: 12 Feb 2011
by Laurent
http://www.multicharts.com/support/base ... le&id=1794
I have converted the indicator from EFS to PowerLanguage

Code: Select all

// DAPDB - Daily Average Price Delta Bands - Function

Inputs:
Series1 ( NumericSeries ), // High
Series2 ( NumericSeries ), // Low
Len ( NumericSimple ),
Type ( NumericSimple ); // -1/1

Variables:
SumH ( 0 ),
SumL ( 0 );

SumH = Summation(Series1, Len);
SumL = Summation(Series2, Len);

if (Len > 0) then
begin
if (Type = 1) then
DAPDB = Series2 + (SumH - SumL) / Len
else if (Type = -1) then
DAPDB = Series1 - (SumH - SumL) / Len
else
DAPDB = 0;
end;

Code: Select all

// DAPDB - Daily Average Price Delta Bands - Indicator

Inputs:
HighPrice ( High ),
LowPrice ( Low ),
Length ( 21 ),
Displace ( 0 );

Variables:
DAPDBUp ( 0 ),
DAPDBDown ( 0 );

DAPDBUp = DAPDB(HighPrice, LowPrice, Length, 1);
DAPDBDown = DAPDB(HighPrice, LowPrice, Length, -1);

Plot1[Displace](DAPDBUp, "DAPDBUp");
Plot2[Displace](DAPDBDown, "DAPDBDown");

Re: DAPD Bands

Posted: 12 Feb 2011
by TJ
you are a good programmer.
thanks for sharing.