using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators;namespace WealthLab.Strategies { public class BluntlyPeeks : WealthScript { protected override void Execute() { // Plot Indicators EMA ema = EMA.Series( Close,10,EMACalculation.Modern ); PlotSeries( PricePane, ema, Color.Purple, LineStyle.Solid, 2 ); for(int bar = 30; bar < Bars.Count; bar++) { if (IsLastPositionActive) { if( LastPosition.PositionType == PositionType.Long ) if( TurnDown( bar, ema ) ) SellAtMarket( bar, LastPosition ); } else { if( TurnUp( bar, ema ) ) BuyAtMarket( bar ); } } } } }