IsDescending

IsDescending ( int length);

Default values:

length: 3

Description

Tests if the trend is descending by calculating the average slope coefficient of trendlines whose start points are MidBodyVal for a specified number of bars and end points are value for current bar. If the slope is negative then the trend is considered descending.

Input parameters

Parameter Default value Description
data - Defines data to test for downtrend conditions.
length 3 Defines period to test for downtrend conditions.

Example

plot DescBar = IsDescending(close, 10);
DescBar.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);

This example draws points at the closing prices for all bars considered as descending in comparison to the MidBodyValfor the last 10 bars.