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.9%

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

[...] (whichStrategyToRun) { case 0: SystemADX.Run( this ); break ; case 1: SystemR2.Run( this ); break ; case 2: SystemVHF.Run( this ); break ; case 3: SystemER.Run( this ); break ; case 4: SystemADX.Run( this ); SystemR2.Run( this ); SystemVHF.Run( this ); SystemER.Run( this ); break ; default : break ; } } } class SystemADX { public static void Run(WealthScript obj) { int periodADX = 14, adxTrend = 30, adxMax = 42, mab = 50, crit = 22, adxLag = 12; double adxMult = 1.8; var c = obj. Close ; var adx = ADX.Series(obj. [...]

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

[...] the "Download" button in Wealth-Lab's "Open Strategy" dialog. Figure 1. A Wealth-Lab Developer 6.2 chart showing the Price Zone Oscillator strategy in action applied to a Daily chart of Walt Disney Co. ( DIS ). Although the new complementary oscillator implementation is pretty straightforward, the accompanying system rules have to function in different market regimes and cover such events as positive and negative price/oscillator divergences. The complexity of their implementation is hidden in an additional library, "Community Components" , available for download [...]

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

[...] 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 ( "XAU" , synch). Close ; //sec2 DataSeries crb = GetExternalSymbol ( "CRB" , synch). [...]

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

[...] 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 = period; bar [...]

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 2017-12 | Weekly & Daily MACD (Apirine) — 0.9%

[...] CreateParameter( "Exit after" , 20, 1, 50, 1); paramDailyLength1 = CreateParameter( "Daily Length 1" ,12,2,300,20); paramDailyLength2 = CreateParameter( "Daily Length 2" ,26,2,300,20); paramWeeklyLength1 = CreateParameter( "Weekly Length 1" ,60,2,300,20); paramWeeklyLength2 = CreateParameter( "Weekly Length 2" ,130,2,300,20); } protected override void Execute() { if ( Bars .Scale ! = BarScale.Daily ) { [...]

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 2021-01 | A Fresh Look At Short-Term Patterns (Kaufman) — 0.9%

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

[...] LineStyle.Solid; ChartPane srsiPane = CreatePane ( 50, false , true ); PlotSeries ( srsiPane, srsi, Color.Green, solid, 2 ); ChartPane adxPane = CreatePane ( 25, true , true ); PlotSeries ( adxPane, adx, Color.Red, solid, 2 ); DrawHorzLine (adxPane,thresholdForTrend,Color.Blue,LineStyle.Dashed,1); for ( int bar = GetTradingLoopStartBar (period); bar < Bars .Count; bar++) { if (! IsLastPositionActive ) { /* 1st peak: both price and indicator [...]

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 2008-11 | Corona Charts (Ehlers) — 0.8%

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

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

[...] Futures Mode: enabled Symbol: ZS; Type: Future; Margin: 4000; Point Value: 50; Tick: 0.25; Decimals: 2 WealthScript Code (C#) /* Seasonal Soybean Strategy per Katsanos article EL code */ using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators; namespace WealthLab.Strategies { public class MyStrategy : WealthScript { StrategyParameter D1DXY; StrategyParameter D2SNL; StrategyParameter LRSDXYSELL; StrategyParameter LRSNLSELL; StrategyParameter MASELL; StrategyParameter [...]

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

[...] signals to buy on the open in the Alerts view as on Figure 1: Figure 1. A view of the Alerts tab with 2 signals with the highest reading of the RS5 oscillator. If you wish to visualize the oscillators, double click on any trading signal. Wealth-Lab will plot them on a chart like Figure 2 illustrates: Figure 2. A sample plot of the RS4 and RS5 oscillators built using author’s default set of 11 index funds on the daily chart of QQQ. Index fund data provided by Tiingo. On a closing note, simply download public [...]

Intraday Support Functions — 0.7%

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

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

[...] 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 profit, while the Period did not affect the results significantly. WealthScript Code (C#) using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators; [...]

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

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

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

[...] "BandPassSeries(" + ds.Description + "," + period + "," + delta + ")" ); double beta = Math.Cos(2 * Math.PI / period); double gamma = 1/ Math.Cos(4 * Math.PI * delta / period); double alpha = gamma - Math.Sqrt(gamma * gamma - 1d); for ( int bar = 2; bar < ds.Count; bar++) { res[bar] = 0.5 * (1 - alpha) * (ds[bar] - ds[bar - 2]) [...]

Intraday | Building blocks of Intraday trading strategies — 0.7%

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

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

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

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 2013-01 | The DMI Stochastic (Star) — 0.7%

[...] almost any entry style without adding prejudice. Entry rules Pullback entry: Buy at open next bar if the DMI Oscillator is above 0 and the DMI Stochastic crosses above 10. Short at open next bar if the DMI Oscillator is below 0 and the DMI Stochastic crosses below 90. Countertrend entry: Short at open next bar if the DMI Oscillator crosses under -20. Buy at open next bar if the DMI Oscillator crosses above 20. Exit rules Fixed bars: exit at open next bar [...]

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

[...] 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 STD = 25, [...]

Interacting Dynamically with Portfolio Level Equity — 0.6%

[...] ( 40, false , true ); PlotSeries ( gEqPane, globalEquity, Color.DarkGreen, LineStyle.Histogram, 2 ); HideVolume (); } } // Your optional "donor" strategy public class Donor : WealthScript { protected override void Execute() { for ( int bar = 21; bar < Bars .Count; bar++) { if ( IsLastPositionActive ) { if ( Close [bar] < Close [bar-20] ) SellAtMarket ( bar+1, [...]

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

TASC 2013-03 | Camarilla Points (Bobrowski) — 0.6%

[...] 0; double Range = high - low; R5 = ( high / low ) * close; R4 = close + Range * 1.1 / 2; R3 = close + Range * 1.1 / 4; R2 = close + Range * 1.1 / 6; R1 = close + Range * 1.1 / 12; S1 = close - Range * 1.1 / 12; S2 = close - Range * 1.1 / 6; S3 = close - Range * 1.1 / 4; S4 = close - Range * 1.1 / 2; S5 = close - (R5 - close); } public void Clear() { R1 = 0; R2 = 0; R3 = 0; R4 = 0; R5 = 0; S1 = 0; S2 = 0; S3 = 0; S4 = 0; S5 = 0; } } public class CamarillaPointsStrategy : WealthScript { [...]

TASC 2011-03 | Three-Bar Inside Bar Pattern (Prathap) — 0.6%

[...] that you might find useful in other pattern-recognition scripts. As can be seen in Figure 1, the three-bar pattern occurs more frequently that you otherwise might expect in the CL, SI, and GC (shown) electronic sessions. Figure 1. The light gray and blue boxes highlight the short and long setups, respectively. While testing the code, we noticed that short trade triggers (the last bar in the pattern) whose Close was below the Low of the previous bar had a better success rate than if the Close were simply lower [...]

TASC 2016-05 | Zero In On The MACD (Star) — 0.6%

[...] does not reflect that move, creating a lower top, the strategy fades the move as illustrated on Figure 2 and exits after a specified number of bars. Figure 2 : Shorting a price top not confirmed by a MACD bearish divergence in SCG (Scana Corp.) in February 2015. Strategy 1: using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators; namespace WealthLab.Strategies { public class TASCMay2016_Crossovers : WealthScript { private StrategyParameter paramUseWarnings; [...]

TASC 2015-12 | Trading The Loonie (Katsanos) — 0.6%

[...] StrategyParameter paramPeriod; public LoonieStrategy() { paramPeriod = CreateParameter( "days" , 20, 2, 300, 1); } protected override void Execute() { int days = paramPeriod.ValueInt; StdDevCalculation s = StdDevCalculation.Sample; var oil = GetExternalSymbol ( "Light" , true ). Close ; var bbCAD = 1 + (( Close - SMA.Series( Close ,days) + 2*StdDev.Series( Close ,days,s)) / (4*StdDev.Series( Close ,days,s)+0.0001)); var bbOil = 1 + ((oil - SMA.Series(oil,days) + 2*StdDev.Series(oil,days,s)) [...]

Stop/Limit Orders — 0.6%

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

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.