PTBar - Peaks and Troughs Bar

Modified on 2008/06/04 17:43 by Administrator — Categorized as: TASCIndicators

Syntax

public PTBar(DataSeries ds, double percent, string description) public static PTBar Series(DataSeries ds, double percent)

Parameter Description

ds Source Series
percent Specifies the percentage that ds must retrace in order to determine that a peak or trough has occurred.

Description

This is the Peaks & Troughs Indicator (PTBar) as described in the November 2006 issue of Stocks & Commodities; Siligardos' article on Active Trend Lines.

PTBar builds a series containing bar numbers of most recent peaks/troughs, by measuring percent changes from lowest values, that is: using (100*Threshold)/(100+Threshold) when looking for peaks. This is to ensure that any two consecutive peaks (troughs) will have exactly one trough (peak) between them.

Example