DAPD Bands

Studies that have been contributed to the community by other users. If you’ve got something useful to share, that’s great!
Laurent
Posts: 159
Joined: 20 Nov 2010
Location: France
Has thanked: 76 times
Been thanked: 34 times

DAPD Bands

Postby Laurent » 12 Feb 2011

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");

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: DAPD Bands

Postby TJ » 12 Feb 2011

you are a good programmer.
thanks for sharing.


Return to “User Contributed Studies and Indicator Library”