PriceROC


Summary

The Price Rate of Change indicator is the percentage change of the current price and the price N periods ago.

Syntax

public PriceROC PriceROC(DataSeries source, int periods)

Parameters

NameDescription

Example 1

[Parameter("Source")]
public DataSeries Source { get; set; }
[Parameter(DefaultValue = 14)]
public int Period { get; set; }
private PriceROC priceROC;
protected override void OnStart()
{
    priceROC = Indicators.PriceROC(Source, Period);
}
protected override void OnTick()
{
   Print("{0}", priceROC.Result.LastValue);
}
Reference