public static Indicators.TroughBar Series(DataSeries source, double reversalAmount, Indicators.PeakTroughMode mode) public static double Value(int bar, DataSeries source, double reversalAmount, Indicators.PeakTroughMode mode)
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() { // Flag bars that are 5% Troughs int n = -1; int nPrev = -1; for(int bar = 0; bar < Bars.Count; bar++) { n = (int)TroughBar.Value( bar, Low, 5, PeakTroughMode.Percent ); if( ( n != nPrev ) && ( n > -1 ) ) { DrawCircle( PricePane, 6, n, Lown, Color.Green, LineStyle.Solid, 2, true ); nPrev = n; } } } } }