public Parabolic(Bars bars, double accelUp, double accelDown, double accelMax, string description) public static Parabolic Series(Bars bars, double accelUp, double accelDown, double accelMax)
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() { double x = 0; PlotSeries( PricePane, Parabolic.Series( Bars, 0.02, 0.02, 0.2 ), Color.Red, WealthLab.LineStyle.Dots, 3 ); for(int bar = 20; bar < Bars.Count; bar++) { x = Parabolic.Series( Bars, 0.02, 0.02, 0.2 )[bar]; if (!IsLastPositionActive) { if( Low[bar] < x ) BuyAtStop( bar+1, x ); else ShortAtStop( bar+1, x ); } else { Position p = LastPosition; if( p.PositionType == PositionType.Long ) { SellAtStop( bar+1, p, x ); ShortAtStop( bar+1, x ); } else { CoverAtStop( bar+1, p, x ); BuyAtStop( bar+1, x ); } } } } } }