Log in to see Cloud of Tags

Wealth-Lab Wiki

Search Engine

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.



Filter by Category

















This search, performed through 4.04 MB (775 documents, 11955 words), completed in 0.1 seconds and yielded 30 results.

TASC 2013-07 | The Step Candle Pattern (Vervoort) — 1.7%

[...] 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 [...]

TASC 2016-10 | Which Trend Indicator Wins? (Katsanos) — 1.5%

[...] (30, true , true ); obj. PlotSeries (p, adx, Color.Red, LineStyle.Solid, 2 ); for ( int bar = obj. GetTradingLoopStartBar (1); bar < obj. Bars .Count; bar++) { if (obj. IsLastPositionActive ) { if ( obj. CrossUnder (bar, c, avgMAB) || obj. CrossOver (bar, c, avgMAB) ) obj. ExitAtMarket ( bar+1, obj. LastPosition , "MA" ); } else { if ( obj. CrossOver (bar, [...]

TASC 2009-02 | Trading the Aussie (Katsanos) — 1.0%

[...] WealthLab.Strategies { public class TradingTheAussie : WealthScript { private DataSeries SecBol( DataSeries ds, int period ) { DataSeries sd = 2 * StdDev.Series(ds, period, StdDevCalculation.Population); return 1 + ( ( ds - SMA.Series(ds, period) + sd ) / ( sd + sd + 0.0001 ) ); } protected override void Execute() { string sampleSym = "YBA" ; // out-of-sample; use "YTC" for in-sample const double pct = 0.007; int per = 30; bool synch = false ; DataSeries xau = GetExternalSymbol [...]

TASC 2016-09 | Measuring Market Cycles (Ehlers) — 1.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]) [...]

TASC 2011-05 | Volume Zone Oscillator (Khalil, Steckler) — 1.0%

[...] StrategyParameter paramPeriod; public VZOStrategy() { paramPeriod = CreateParameter( "VZO Period" , 14, 2, 252, 2); } protected override void Execute() { int period = paramPeriod.ValueInt; DataSeries R = new DataSeries( Bars , "R" ); DataSeries TV = EMA.Series( Volume , period, EMACalculation.Modern ); DataSeries VZO = new DataSeries( Bars , "VZO" ); ADX adx = ADX.Series( Bars ,14 ); EMA ema = EMA.Series( Close , 60, EMACalculation.Modern ); for ( int bar [...]

TASC 2011-06 | Entering The Price Zone (Khalil, Steckler) — 1.0%

[...] StrategyParameter paramPeriod; public PZOStrategy() { paramPeriod = CreateParameter( "PZO Period" , 14, 2, 252, 2); } protected override void Execute() { int period = paramPeriod.ValueInt; DataSeries R = new DataSeries( Bars , "R" ); DataSeries TV = EMA.Series( Close , period, EMACalculation.Modern ); DataSeries PZO = new DataSeries( Bars , "PZO" ); ADX adx = ADX.Series( Bars ,14 ); EMA ema = EMA.Series( Close , 60, EMACalculation.Modern ); for ( int bar [...]

Introductory | Bars, Loops, and Bar + 1 — 0.9%

Bars, Loops, and Bar + 1 Original article by Robert Sucher in the legacy Knowledge Base here . Wealth-Lab Developer has features such as order slippage and variable commissions to bring trading simulation as close to reality as possible. Likewise, your task as a trading system designer is to express your system in C# code that validly recreates security orders as they would have been and will be executed in real life. Bar Definition A bar is any interval of time that has an open, high, low, and closing [...]

TASC 2015-10 | The Money Flow Oscillator (Apirine) — 0.9%

[...] from recent peaks or troughs. System rules Once a bullish divergence is detected, enter long next bar at open if MFO is below its centerline Exit long next bar at open when MFO crosses above the centerline Trades from the short side are deliberately not taken as their performance seems poor. Figure 1. Bullish divergence between the MFO and price formed in June 2015 triggered a long trade in KO (Coca Cola). After updating the TASCIndicators library to v2015.09 or later, the MoneyFlowOscillator indicator can be found under the TASC [...]

TASC 2021-01 | A Fresh Look At Short-Term Patterns (Kaufman) — 0.8%

[...] ATR.Series( Bars , atrPeriod); var trendFilter = SMA.Series( Close , maPeriod); for ( int bar = GetTradingLoopStartBar (Math.Max(atrPeriod,maPeriod)); bar < Bars .Count; bar++) { //key reversal bool keyRevBear = High [bar] > High [bar - 1] && Low [bar] < Low [bar - 1] && Close [bar] < Low [bar [...]

TASC 2015-07 | The Slow Relative Strength Index (Apirine) — 0.8%

[...] StrategyParameter paramExitDays; public SRSI_Divergence() { paramPeriod = CreateParameter( "SRSI period" , 6, 1, 100, 1); paramPeriodWMA = CreateParameter( "WilderMA period" , 14, 1, 100, 1); paramThresholdForTrend = CreateParameter( "ADX Threshold" , 30, 10, 50, 10); paramHighest = CreateParameter( "Highest high of" , 20, 5, 50, 1); paramExitDays = CreateParameter( "Exit after" , 20, 1, 50, 1); } protected override void Execute() { bool peak = false ; int peakBar = -1; int high = paramHighest.ValueInt; [...]

TASC 2009-11 | Seasonal System for Soybean Futures (Katsanos) Rev A — 0.8%

[...] MADXY; StrategyParameter chnlLength; public MyStrategy() { D1DXY = CreateParameter( "DX LRSlope Period" , 25, 10, 50, 1); D2SNL = CreateParameter( "Snl LRSlope Period" , 12, 5, 25, 1); LRSDXYSELL = CreateParameter( "DX LRSlope" , 0.3, 0.1, 0.8, 0.1); LRSNLSELL = CreateParameter( "Snl LRSlope" , -0.8, -1.2, -0.5, 0.1 ); MASELL = CreateParameter( "Soybean EMA Period" , 15, 5, 25, 1); MASNL = CreateParameter( "Snl EMA Period" , 15, 5, 25, 1); MADXY = CreateParameter( [...]

FAQ | Strategies and WealthScript — 0.8%

[...] to create a Pullback in an Uptrend entry. For instance, in an established uptrend, wait for a three bar pullback and enter at stop $0.10 above prior bar high. However, the Rule Wizard doesn't seem to have "Buy at Stop" rule desired. Solution: You can get pretty close by starting with these rules: BuyAtLimit ( High ) - Moving Average is trending up (Moving Average group) - Price decreases a consecutive number of bars (Price (or Volume ) group) ..and add an exit (if you only want a screen, see Techniques > Creating a Screener in the [...]

TASC 2020-08 | Tracking Relative Strength In Four Dimensions (RS4r) (Garofallou) — 0.7%

[...] WealthScript { LineStyle ls = LineStyle.Solid; public DataSeries RS2t(DataSeries ds, string index, int period = 10, bool plotSeries = false ) { var rs = new DataSeries(ds, string .Format( "RS2t({0},{1},{2}" , ds.Description, index, period)); var extSym = GetExternalSymbol (index, true ); var RS1 = ds / extSym. Close ; var Fast = EMAModern.Series(RS1, period); //Fast MA: Orange var Med = SMA.Series(Fast, 7); //Medium MA: Green var Slow = SMA.Series(Fast, 15); //Slow MA: Red [...]

TASC 2009-07 | Tr&nd Stop (Vervoort) — 0.7%

[...] programmed the long-only Tr&nd stop strategy for Wealth-Lab 5 in C#. You can use the sliders to adjust the Period and atrFactor Strategy Parameters to eyeball an optimization, or using WLP 5.4 you can now run full Exhaustive and Monte Carlo optimizations. A portfolio simulation ($5000 size, $8 1-way commissions) on the Dow 30 symbols over the last 6 years yielded the 2-Parameter optimization curve in Figure 1. Figure 1. While the optimization didn’t inspire confidence in the strategy’s stability over a wide range of parameters, ATR Factors around 2 helped improve the overall [...]

TASC 2017-12 | Weekly & Daily MACD (Apirine) — 0.7%

[...] indicatorLowest = Lowest.Series( WM, low ); Lowest hLow = Lowest.Series( Low , low ); for ( int bar = GetTradingLoopStartBar (130); bar < Bars .Count; bar++) { if (! IsLastPositionActive ) { /* 1st peak: both price and indicator */ if ( peak == false ) { if ( ( High [bar-1] == Highest.Series( High , high )[bar-1] ) & ( WM[bar-1] == Highest.Series( WM, high )[

Intraday / Multi-Time Frame | Mixing intraday and daily data — 0.7%

[...] ); PlotSeries ( PricePane , daily. Close , Color.Black, LineStyle.Dashed, 1 ); for ( int bar = 20; bar < Bars .Count; bar++) { if ( IsLastPositionActive ) { if ( Bars .IsLastBarOfDay( bar ) ) SellAtClose ( bar, LastPosition , "At Close" ); else SellAtStop ( bar+1, LastPosition , Stop, "Stop" ); } else { //if (Date[bar].Hour == [...]

TASC 2014-10 | Exploring Charting Techniques: Part 3 (Vervoort) — 0.6%

[...] of our example Strategy, we take a standard Renko chart and use Daily prices. Despite using the same period, the HA-based average always lags behind due to added smoothing. The rules are: When the 8-period “fast” average crosses above the “slower” counterpart of the same period, a long position is established. When the 8-period “fast” average crosses below the “slower” average of the same period, the long position is closed. Figure 1. A Wealth-Lab [...]

TASC 2015-03 | Kiss & Touch With The Modified True Range (Lindgren) — 0.6%

[...] the average MTR by 3 standard deviations of MTR or greater. An entry is triggered when: Buy next bar at market if today's close price has declined. Short next bar at market if today's close price has increased. A position is exited with a simple trailing channel exit: Exit long when today's low price has broke below the 3-day lowest price. Cover short when today's high price has broke above the 3-day highest price. This system is merely a proof-of-concept. Among possible enhancements to this barebone system, the following can be [...]

Intraday Support Functions — 0.6%

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 GetTime returns 24-hour time as an integer. Example: [...]

Intraday | Building blocks of Intraday trading strategies — 0.6%

[...] 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 [...]

TASC 2020-11 | Voting With Multiple Timeframes (F. Arden Thomas) — 0.6%

[...] process considered intraday data instead. As a result, our aggregate voting indicator polls for the 21-period Stochastic readings on 60-minute, Daily, Weekly, Monthly, Quarterly and Yearly time frames. The code below requires intraday data which you can get for free or on a subscription basis from different providers such as Tiingo, Alpha Vantage or DTN IQFeed. We use a modified version of author’s Example 2 which can take multiple positions in the same symbol. Strategy rules: Long setup : Buying pressure >= 5 Buy tomorrow at open each time when selling pressure is [...]

TASC 2010-03 | Empirical Mode Decomposition (Ehlers, Way) — 0.6%

[...] WealthLab.Strategies { public class EmpiricalModeDecomp : WealthScript { StrategyParameter _period; StrategyParameter _delta; StrategyParameter _fraction; public EmpiricalModeDecomp() { _period = CreateParameter( "Period" , 20, 5, 50, 1); _delta = CreateParameter( "Delta" , 0.5, 0.05, 1, 0.05); _fraction = CreateParameter( "Fraction" , 0.25, 0.1, 1, 0.05); } public DataSeries BandPassSeries(DataSeries ds, int period, double delta) [...]

TASC 2013-10 | An Expert Of A System (Vervoort) — 0.6%

[...] above the 2nd one and the previous value was less than or equal to the target value at the previous bar. Motivated traders can compare approaches by commenting and uncommenting these lines: if ( CrossUnder ( bar, tpEma, haEma ) ) //if( tpEma[bar] < haEma[bar] ) ... if ( CrossOver ( bar, tpEma, haEma ) ) //if( tpEma[bar] > haEma[bar] ) To run the sample Strategy in Wealth-Lab, [...]

ChandelierStop — 0.5%

Syntax public static double ChandelierStop( this Position p, Bars bars, int bar, int period, double coefficient ) public double ChandelierStop(Bars bars, int bar, Position p, int period, double coefficient ) Parameter Description p Position to apply Chandelier stop to period TR period for Chandelier stop calculation coefficient ATR factor for Chandelier stop calculation bars Bars object bar [...]

TASC 2014-09 | Finding The Golden Triangle (Hudgin) — 0.5%

[...] 10); paramMinRise = CreateParameter( "Min. rise %" , 10, 5, 200, 5); paramSMA = CreateParameter( "SMA period" , 50, 10, 200, 10); paramMom = CreateParameter( "Momentum period" , 10, 2, 30, 2); paramHi = CreateParameter( "Highest period" , 20, 10, 100, 10); paramProximity = CreateParameter( "Within SMA %" , 2, 1, 5, 1); paramPullback = CreateParameter( "Pullback %" , 2, 2, 18, 2); paramRecovery = CreateParameter( "Approaching %" , 2, 2, 6, 2); paramTimeout = CreateParameter( "Expires after Y bars" [...]

Stop/Limit Orders — 0.5%

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, int bar, [...]

TASC 2017-07 | Trading The Nikkei (Katsanos) — 0.5%

[...] StrategyParameter slider3; public MyStrategy() { slider1 = CreateParameter( "Regression Period" ,50,2,300,20); slider2 = CreateParameter( "Div.Mom. Period" ,50,2,300,20); slider3 = CreateParameter( "ROC Period" ,3,2,300,20); } protected override void Execute() { var fxy = GetExternalSymbol ( "FXY" , true ); var spy = GetExternalSymbol ( "SPY" , true ); var rd = RegressionDivergence.Series( Bars ,fxy,spy,slider1.ValueInt,slider2.ValueInt,slider3.ValueInt); int [...]

TASC 2008-11 | Corona Charts (Ehlers) — 0.5%

[...] changed from 12 to 51, and DataSeries initializations have been simplified. // WAS: double Trend = ds[bar] - ds[cycPeriod]; // SHOULD BE (IS): double Trend = ds[bar] - ds[bar - cycPeriod]; /* Strategy Code revised 20090611 */ using System; using System.Collections; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators; namespace WealthLab.Strategies { public class CoronaCharts : WealthScript { public const double twoPi = 2 [...]

TASC 2012-11 | Identify the Start of a New Trend with DMI (Low) — 0.5%

[...] double Average(List< double > lst) { double total = 0.0; double average = 0.0; int period = lst.Count; if ( period > 0 ) { for ( int x = 0; x < period; x++) total += lst[x]; average = total / period; } return average; } bool Convergence(List< double > lst, double scatter, double threshold, bool greater) { bool result = false ; if ( lst.Count > 0 ) { lst.Sort(); double first = lst[0]; [...]

TASC 2008-05 | Reliable Crossovers (Vervoot) — 0.5%

[...] 5% of equity sizing method. The Buy & Hold strategy, however, returned nearly 38% APR over the same period. Figure 1. Note that one of the crossovers did not result in creating a simulated trade. This is not an error and due to the results of a Portfolio Simulation in which insufficient equity existed at the time of the trading alert. The WealthScript code also creates the Heikin-Ashi chart style. Strategy Code using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators; using TASCIndicators; [...]

Important Disclaimer: The information provided by Wealth-Lab is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.  The owner of Wealth-Lab.com assumes no liability resulting from the use of the material contained herein for investment purposes. By using this web site, you agree to the terms of this disclaimer and our Terms of Use.


ScrewTurn Wiki. Some of the icons created by FamFamFam.