Page History: Positive Closes
Compare Page Revisions
Page Revision: 2014/07/12 14:11
Positive Closes: Indicator Documentation
Syntax
DataSeries PositiveCloses( DataSeries ds, int Lookback )
Parameter Description
ds | Data series |
Lookback | The number of bars over which to count positive closes. |
Description
A "positive close" occurs when the value of the
DataSeries is higher than it was on the previous bar. This indicator returns the number of positive closes over the specified lookback period.
Note! Version 2010.10 of Community Indicators contains a breaking change: replaced Bars parameter with DataSeries.
Example
Example based on version 2010.10 of Community Indicators.
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using WealthLab;
using Community.Indicators;
namespace WealthLab.Strategies
{
public class MyStrategy : WealthScript
{
protected override void Execute()
{
PositiveCloses pc = PositiveCloses.Series( Close, 1 );
ChartPane closes = CreatePane( 25, true, true );
PlotSeries( closes, pc, Color.Blue, LineStyle.Solid, 2 );
}
}
}