public KAMA(DataSeries source, int period, string description) public static KAMA Series(DataSeries source, int period)
using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators;namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { DataSeries K1 = KAMA.Series( Close, 8 ); DataSeries K2 = KAMA.Series( Close, 16 ); PlotSeries( PricePane, K1, Color.Red, WealthLab.LineStyle.Solid, 1 ); PlotSeries( PricePane, K2, Color.Maroon, WealthLab.LineStyle.Solid, 1 ); // Note that KAMA is considered to be an "unstable" indicator; hence the bar loop starts at 50 for(int bar = 50; bar < Bars.Count; bar++) { if (IsLastPositionActive) { if( CrossUnder( bar, K1, K2 ) ) SellAtMarket( bar+1, LastPosition ); } else { if( CrossOver( bar, K1, K2 ) ) BuyAtMarket( bar+1 ); } } } } }