public static FAMA Series(DataSeries source, double fastLimit, double slowLimit)
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() { MAMA mama = MAMA.Series( Close, 0.5, 0.05 ); FAMA fama = FAMA.Series( Close, 0.5, 0.05 ); PlotSeries( PricePane, mama, Color.Red, LineStyle.Solid, 1 ); PlotSeries( PricePane, fama, Color.Blue, LineStyle.Solid, 1 ); for(int bar = 40; bar < Bars.Count; bar++) { if( CrossOver( bar, mama, fama ) ) BuyAtMarket( bar+1 ); else if( CrossOver( bar, fama, mama ) ) SellAtMarket( bar+1, LastPosition ); } } } }