Slope()
Previous Topic  Next Topic 

Definition
The slope is a measure of the steepness of a line.

Method Return Value

This method returns a double value indicating the slope of a line


Syntax
Slope(IDataSeries series, int startBarsAgo, int endBarsAgo)


Method Of

Custom Indicator, Custom Strategy

Parameters

series

Any DataSeries type object such as an indicator, Close, High, Low etc..

startBarsAgo

Specifies the starting point of a line

endBar

Specifies the ending point of aline


Examples

// Prints the slope of the 20 period simple moving average of the last 10 bars
Print(Slope(SMA(20), 9, 0));