Here you can search through the pages of this Namespace, their attachments and the files uploaded to the system.
Note: the results will only display the items you have permissions to read.
[...]
}
// Keep cntMax fifo samples and find the Highest and Lowest lead for samples in the list
private void PhaseList( ref ArrayList fifo, int cntMax, double lead, out double H, out double L)
{
H = lead; L = lead;
if ( fifo.Count < cntMax )
fifo.Add(lead);
else {
fifo.RemoveAt(0);
fifo.Add(lead);
}
for ( int n = 0; n < fifo.Count - 1; n++) {
double val = ( double )fifo[n];
if ( val > H ) H = val;
if ( val < L ) L = val;
}
}
public void SuperIndicators(DataSeries [...]
Syntax Community Indicators:
public SwingHiLo( Bars bars, int LeftBars, double LeftReversalAmount, int RightBars, double RightReversalAmount, double EqualPriceThreshold, bool PercentMode, bool SetLeftSwings, bool SetOuterSwings, bool SetSteppedSeries, string description )
public SwingHiLo( Bars bars, int LeftBars, int RightBars, double EqualPriceThreshold, bool SetLeftSwings, bool SetOuterSwings, bool SetSteppedSeries, string description )
public static SwingHiLo( Bars [...]
[...] 1.0, 50.0, 1.0);
paramLookbackForStepPattern = CreateParameter( "Lookback" , 3, 1, 20, 1);
}
bool isInsideBody( int bar, double price ) {
return price <= Math.Max( Open [bar], Close [bar]) && price >= Math.Min( Open [bar], Close [bar]);
}
bool Upstep( int bar, int lookback ) {
bool result = false ;
bool way1 = ( Open [bar] > Close [bar] & Open [bar+1] < Close [bar+1]) && isInsideBody(bar, Open [bar+1]) && Close [bar+1] > Open [bar];
bool [...]
Syntax
public static int GetTime( this WealthScript obj, int bar)
public static int GetTime( this Bars bars, int bar) // For use when using a non-synchronized Bars object public int GetTime( int bar)
public int GetTime(Bars bars, int bar) // For use when using a non-synchronized Bars object
Parameter Description bar Bar number bars Bars object [...]
[...] = 2.0 * a1 * Math.Cos((1.414 * 180d / 8.0) * Deg2Rad);
double c2 = b1;
double c3 = -a1 * a1;
double c1 = 1 - c2 - c3; for ( int bar = 2; bar < Bars .Count; bar++)
{
HP[bar] = 0.5*(1 + alpha1) * ( Close [bar] - Close [bar-1]) + alpha1*HP[bar-1];
//Smooth with a SuperSmoother Filter
Filt[bar] = c1*(HP[bar] + HP[bar-1]) / 2 + c2*Filt[bar-1] + c3*Filt[bar-2];
}
DataSeries[] ds = new DataSeries[48];
ChartPane tp = CreatePane (50, false , false );
for ( int n [...]
Syntax
public static void DrawLinRegChannel( this WealthScript obj, int bar, DataSeries ds, int period, double width, Color color, LineStyle style, int line)
public static void DrawLinRegChannel( this WealthScript obj, int bar, DataSeries series, int period, Color color, LineStyle style, int line)
public static void DrawLinRegChannel( this WealthScript obj, int bar, DataSeries [...]
Syntax public static int CheckExtendedTrendline( this WealthScript obj, int bar, ChartPane pane, DataSeries ds, int bar1, int bar2, Color linecolor, int thickness, int consecBars = 1) public int CheckExtendedTrendline( int bar, ChartPane pane, DataSeries ds, int bar1, int bar2, Color linecolor, [...]
[...] CreateParameter( "Indctr Peak%" , 20, 5, 30, 1);
exitBars = CreateParameter( "Exit bars" , 20, 1, 30, 1);
}
private const int proxBars = 6;
private int _barLastChecked = 0; protected override void Execute()
{
int pkPctPrice = peakPctPrice.ValueInt;
int pkPctIndicator = peakPctIndicator.ValueInt;
int barsToHold = exitBars.ValueInt;
int lastDetectedBar = 0;
_barLastChecked = 0;
var s = [...]
[...] ;
ChartPane MACDPane = CreatePane (25, true , true );
PlotSeries (MACDPane, macd, Color.Red, LineStyle.Histogram, 2);
for ( int bar = GetTradingLoopStartBar (55 * 3); bar < Bars .Count; bar++)
{
bool isBarBlue = false ;
bool isAboveMA = Close [bar] > ema[bar];
bool isWarning = ( Close [bar] < wma[bar]) && ( High [bar] > ema[bar]);
if ( macd[bar] > 0 )
{
SetSeriesBarColor ( bar, macd, Color.Blue );
SetBarColor ( bar, Color.Blue );
isBarBlue = true ;
if ( isWarning )
[...]
Syntax public static Position BuyAtStopLimit( this WealthScript ws, int bar, double price)
public static Position BuyAtStopLimit( this WealthScript ws, int bar, double price, string signalName)
public static Position ShortAtStopLimit( this WealthScript ws, int bar, double price)
public static Position ShortAtStopLimit( this WealthScript ws, int bar, double price, string signalName)
public static bool SellAtStopLimit( this WealthScript ws, [...]
[...] CreateParameter( "Exit bars" , 5, 1, 30, 1);
}
// Strategy logic
protected override void Execute()
{
int pkPctPrice = peakPctPrice.ValueInt;
int pkPctIndicator = peakPctIndicator.ValueInt;
int barsToHold = exitBars.ValueInt;
int lastDetectedBar = 0;
_barLastChecked = 0;
DataSeries rsi = RSI.Series( Close , 14);
ChartPane rsiPane = CreatePane (40, true , true );
PlotSeries (rsiPane, rsi, Color.Brown, WealthLab.LineStyle.Solid, [...]
[...] paramSL.Value;
const string t = "\t" ;
ZZBuilder zz = new ZZBuilder( Bars , percent );
List<ZigZag> lst = zz.ZigZags;
for ( int bar = 1; bar < Bars .Count; bar++)
{
if ( IsLastPositionActive )
{
Position p = LastPosition ;
double ProfitTgt = 0, StopPrice = 0;
if ( p.PositionType == PositionType.Long ) {
ProfitTgt = p.EntryPrice * (1 + target / 100.0d);
StopPrice = p.EntryPrice * (1 - stop / 100.0d);
}
else {
ProfitTgt = p.EntryPrice * (1 - target [...]
Syntax
public LBR3_10(DataSeries ds, int period1, int period2, string description)
public static [...]
[...] cosine)
{
double twoPi = 2 * Math.PI;
// Initialize arrays
ArrayHolder[] ah = new ArrayHolder[51];
for ( int n = 8; n < 51; n++ )
ah[n] = new ArrayHolder();
Color[] color = new Color[21];
DataSeries[] DB = new DataSeries[51];
double domCycle = 0d;
string name = ds.Description;
DataSeries result = Close - Close ;
result.Description = "Dominant Cycle(" + name + ")" ;
// Create and plot the decibel series - change the colors later
ChartPane dbPane = CreatePane (40, [...]
[...] WealthLab.Strategies
{
public class FibLucas : WealthScript
{
private StrategyParameter paramAmount;
int [] fib = new int [] {5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765};
int [] lucas = new int [] {3,4,7,11,18,29,47,76,123,199,322,521,843,1364,2207,3571};
Font font = new Font( "Wingdings" , 8, FontStyle.Bold);
Font font2 = new Font( "Verdana" , 7, FontStyle.Regular);
string upArrow = Convert.ToChar(0x00E9). ToString ();
string dnArrow [...]
[...] Function to easily determine and compare time of day
public class MyStrategy : WealthScript
{
public int GetTime( int bar)
{
return Date [bar].Hour * 100 + Date [bar].Minute;
}
protected override void Execute()
{
// Specifically, I use a strategy that buys stocks only in the time period between 9:55 am and 13:00. for ( int bar = 1; bar < Bars .Count; bar++)
{
if ( IsLastPositionActive )
{
// exit rule here...
}
else if ( ( GetTime(bar) >= 0955 ) & ( GetTime(bar) [...]
[...] avgMonthlyPrice = Synchronize ( avgMonthlyPrice);
avgYearlyPrice = Synchronize ( avgYearlyPrice);
HideVolume (); //Collect monthly average price
var lstMonths = new List<MonthData>();
for ( int bar = 1; bar < Bars .Count; bar++)
{
if ( Date [bar].Month ! = Date [bar - 1].Month) //New month
{
lstMonths.Add( new MonthData( Date [bar].Month, Date [bar].Year, avgMonthlyPrice[bar]));
}
} //Calculations
for ( int bar [...]
[...] Buy = 1, Sell = -1, NA = 0 }
public class TASC201406_Kaufman : WealthScript
{
Side SingleDivergence( int bar, int period, int momperiod,
DataSeries ps, DataSeries ms, out bool trendup, out bool trenddn, out int p, out int m )
{
trendup = (ps[bar] > 0 && ms[bar] > 0);
trenddn = (ps[bar] < 0 && ms[bar] < 0);
p = ps[bar] >= 0 ? 1 : ps[bar] < 0 ? -1 : 0;
m = ms[bar] [...]
Projection Bands
Syntax
public PBandUpper( Bars bars, int period, string description)
public static PBandUpper Series( Bars bars, int period) public PBandLower( Bars bars, int period, string description)
public static PBandLowerSeries( Bars bars, int [...]
Syntax public RelativeDailyMACD(DataSeries ds, int DailyLength1, int DailyLength2, int WeeklyLength1,
Syntax public RelativeDailyPPO(DataSeries ds, int DailyLength1, int DailyLength2, int WeeklyLength1,
Syntax
public static MTop CheckTop( this WealthScript obj, int bar, DataSeries ds, int lookback, double pctRetrace, double threshold)
public static WBottom CheckBottom( this WealthScript obj, int bar, DataSeries ds, int lookback, double pctRetrace, double threshold) public MTop CheckTop( int bar, DataSeries ds, int lookback, double pctRetrace, double threshold)
public WBottom CheckBottom( [...]
Syntax
public static int DaysBetweenDates( this int fromDate, int toDate )
public static int DaysBetweenDates( this string fromDate, string toDate ) public int DaysBetweenDates( int fromDate, int toDate )
public int DaysBetweenDates( string fromDate, string toDate )
Parameter Description fromDate Starting date toDate Ending date
Description [...]
ATR — 0.5%
Syntax public ATR(WealthLab. Bars bars, int period, string description)
public static ATR Series(WealthLab. Bars bars, int period)
public static double Value( int bar, WealthLab. Bars bars, int period)
Parameter Description
bars
The Bars object
period
Indicator calculation period
Description The Average True Range is the average of the true ranges over the specified Period. WealthScript uses the moving average as formulated by Welles Wilder, [...]
Syntax
public AlligatorJaw(DataSeries ds, int period, int delay, string description)
public static AlligatorJaw Series(DataSeries ds, [...]
Syntax
public static int GetRemainingTradingDays( this DateTime DateFrom) public static int GetRemainingTradingDays(DateTime DateFrom)
Parameter Description DateFrom From which date Description
This function returns the approximate number of remaining trading days in a month. For example, it is useful with Strategies that enter X market days before the end of the month and exit on Y market day of the following month. Note that even after handling weekends properly, you're still left with business (banking/trading) [...]
[...] WealthLab.Indicators;
using Community.Components; namespace WealthLab.Strategies
{
internal struct PipInterval
{
public int X1;
public int X2;
}
public class zzTOPAutoStudy : WealthScript
{
StrategyParameter _pct;
StrategyParameter _thickness;
List< int > _pipList; // list of PIP bar numbers
public zzTOPAutoStudy()
{
_pct = CreateParameter( "PIP Percent" , 20, 2, 50, 1);
_thickness = CreateParameter( "Line Width" , 2, 1, 3, 1);
}
int getPipBar(DataSeries [...]
Syntax public InverseFisherRSI(WealthLab.DataSeries ds, int rsiPeriod, int emaPeriod, string description)
public static InverseFisherRSI Series(WealthLab.DataSeries ds, int rsiPeriod, int emaPeriod)
Parameter Description
ds
DataSeries for the InverseFisherRSI calculation
rsiPeriod
The RSI period used in the InverseFisherRSI calculation.
smoothPeriod
The EMA period used in the InverseFisherRSI calculation.
Description InverseFisherRSI [...]
Syntax public CIV( Bars bars, int startTime, int stopTime, string description)
public static CIV Series( Bars bars, int startTime, int stopTime) Parameter Description
Bars
A Bars object
startTime
Start time
stopTime
Stop time
Description Sums volume from start to stop times, and holds the result constant until it is reset the following day. CIV is the Cumulative Intraday Volume between the supplied start and stop times. Use in [...]
Syntax
public static void PriceVolumeHeatMap( this WealthScript obj, int lookback, [...]