Page History: Negative Closes
    Compare Page Revisions
 
    
    
    
    
    
    Page Revision: 2010/09/12 12:34
Negative Closes: Indicator Documentation
Syntax
DataSeries NegativeCloses( DataSeries ds, int Lookback )Parameter Description
| ds | Data series | 
| Lookback | How many negative closes there were over the specified period | 
Description
This indicator simply returns the number of negative 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()
		{
			NegativeCloses nc = NegativeCloses.Series( Close, 1 );
			ChartPane closes = CreatePane( 25, true, true );
			PlotSeries( closes, nc, Color.Red, LineStyle.Solid, 2 );
		}
	}
}