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.0 seconds and yielded 30 results.

Quandl provider suite — 2.4%

[...] randomColor; } protected override void Execute() { if ( Bars .HasNamedDataSeries ) { ChartPane p = CreatePane ( 100, true , true ); foreach ( DataSeries ds in Bars .NamedSeries ) PlotSeries ( p, ds, RandomColor(), LineStyle.Solid, 1 ); } else PrintDebug ( Bars .Symbol + " does not contain named series" ); } } } CoT data by Quandl This example illustrates creation of a custom DataSeries from the COT Named Series data defined as Commercial Long - Commercial Short and then applying RSI indicator [...]

Interacting Dynamically with Portfolio Level Equity — 2.4%

[...] for ( int bar = Bars .FirstActualBar; bar < Bars .Count; bar++) { foreach (Position p in sr. Positions ) { if (( p.EntryDate == Bars . Date [bar] ) & ( p. Bars .Symbol == Bars .Symbol )) { #region User-configurable: Interacting with Portfolio Equity /* Your equity interaction rule goes here: */ if ( globalEquity[bar] > globalEquity[bar-100] ) { Position pos = u.entry( p, bar, p.EntrySignal, [...]

TASC 2013-01 | The DMI Stochastic (Star) — 2.3%

[...] dmo[bar] > 0 ? Color.DarkBlue : Color.Red ); if ( IsLastPositionActive ) { Position p = LastPosition ; if ( paramExitType.ValueInt == 0 ) // Fixed bars { if ( bar+1 - p.EntryBar >= FixedBars ) ExitAtMarket ( bar+1, p, "Timed" ); } else { // Profitable/losing closes if ( p.PositionType == PositionType.Long ) { if ( Bars . Close [bar] > p.EntryPrice [...]

TASC 2017-10 | A Candlestick Strategy With Soldiers And Crows (D'Ambrosio, Star) — 1.6%

[...] ( 50 ); bar < Bars .Count; bar++) { if ( IsLastPositionActive ) { Position p = LastPosition ; if ( p.PositionType == PositionType.Long ) { var twoLowerLows = CumDown.Series( Low , 1)[bar - 1] >= 2; var overbot = (sto[bar] >= 80) || (rsi[bar] >= 70); double Stop = p.EntryPrice * (1 - paramSL.Value / 100d); double Profit = p.EntryPrice * (1 + paramTP.Value / 100.0d); if ( twoLowerLows ) SellAtMarket [...]

TomorrowIsLastTradingDayOfWeek — 1.6%

[...] rsiPeriod * 3; bar < Bars .Count; bar++) { if ( IsLastPositionActive ) { Position p = LastPosition ; if (p.MFEAsOfBarPercent(bar) >= _profitPct.Value) SellAtMarket (bar + 1, p, "Profit" ); else if ( this .TomorrowIsLastTradingDayOfWeek(bar)) SellAtClose (bar + 1, p, "Friday" ); } else { if ( this .DateOfNextTradingDay(bar).DayOfWeek < Date [bar].DayOfWeek) { double pri = chase * RSI.Series( [...]

TASC 2014-12 | Detecting Flags In Intraday Charts (Katsanos) — 1.5%

[...] Wealth-Lab 6 chart illustrating the detection of the flag pattern on a 5-minute chart chart of SPY (S&P 500 SPDR). With minimal tweaks to the system's parameters it can be applied to charts of different time frames (e.g. EOD): Figure 2. A failed flag on the Daily chart of AXP (American Express) in Wealth-Lab 6. There's room for improvement: consider adding a filter against erratic price movement, phase out the less probable trades against the medium-term (daily) trend, playing with the exits (to our taste, the initial stop at the flag bottom may result in premature [...]

TASC 2016-04 | Trading Gap Reversals (Calhoun) — 1.4%

[...] .Count; bar++) { if ( Date [bar]. Date > Date [bar-1]. Date ) cnt++; Position p = LastPosition ; if ( IsLastPositionActive ) { double amount = p.MFEAsOfBar(bar) /

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

[...] SetBackgroundColor ( bar, Color.FromArgb( 30, Color.Green ) ); if ( IsLastPositionActive ) { Position p = LastPosition ; if ( p.PositionType == PositionType.Long ) { if ( p.EntrySignal.ToLower().Contains( "uptrend" ) ) { if ( PZO[bar] > 60 && TurnDown ( bar, PZO ) || ( Close [bar] < ema[bar] && PZO[bar] < 0 ) || (pd[bar] <= -1.0 && PZO[bar] < 40.0) ) SellAtMarket ( bar+1, p, "trend sell" ); } [...]

PlotSymbolTrades — 1.4%

[...] int bar = 40; bar < Bars .Count; bar++) { if ( IsLastPositionActive ) { Position p = LastPosition ; SetContext ( "KO" , true ); if ( p.PositionType == PositionType.Long ) SellAtStop ( bar+1, p, Lowest.Series( Low ,20 )[bar] ); else CoverAtStop ( bar+1, p, Highest.Series( High ,20 )[bar] ); RestoreContext (); } else { SetContext ( "KO" , true ); Position p = BuyAtStop ( [...]

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

[...] double hi = High [bar]; double lo = Low [bar]; if (patternBars > 1) { int p = patternBars - 1; for ( int n = bar - 1; n >= bar - p; n--) { hi = High [n] > hi ? High [n] : hi; lo = Low [n] < lo ? Low [n] : lo; } } int b1 = bar - patternBars; int b2 = Math.Min(bar + 1, Bars .Count - 1); DrawPolygon ( PricePane , color, color, LineStyle.Invisible, 1, true , b1, hi, b2, hi, b2, lo, b1, lo); } protected override void Execute() { Position

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

[...] SetBackgroundColor ( bar, Color.FromArgb( 30, Color.Green ) ); if ( IsLastPositionActive ) { Position p = LastPosition ; if ( p.PositionType == PositionType.Long ) { if ( p.EntrySignal.ToLower().Contains( "uptrend" ) ) { if ( VZO[bar] > 60 && TurnDown ( bar, VZO ) || ( Close [bar] < ema[bar] && VZO[bar] < 0 ) || (pd[bar] <= -1.0 && VZO[bar] < 40.0) ) SellAtMarket ( bar+1, p, "trend sell" ); } [...]

TASC 2013-06 | The 1-2-3 Wave Count (Vervoort) — 1.3%

[...] 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 / 100.0d); StopPrice = p.EntryPrice [...]

ChandelierStop — 1.3%

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 Bar number Description The Chandelier Stop is a trailing stop that is based on the volatility [...]

Intraday | Building blocks of Intraday trading strategies — 1.2%

[...] int bar = 1; bar < Bars .Count; bar++) { if ( IsLastPositionActive ) { Position p = LastPosition ; // loop backwards from current bar to last position's bar of entry for ( int Bar = bar; Bar >= p.EntryBar; Bar-- ) { // when day changes, increment counter if ( Bars .IntradayBarNumber( Bar ) == 0 ) { cnt++; break ; } } // when counter reaches 3, sell if ( cnt >= 3 ) ExitAtMarket ( bar+1, LastPosition ); } else [...]

Intraday Support Functions — 1.2%

[...] second day loaded in the current chart. Syntax public static int DaysInPosition( this Position p, int bar) public int DaysInPosition( int bar) Parameter Description bar Bar number p Position object DaysInPosition returns how many trading days have passed since establishing a position using intraday data. Example: // Extension method syntax Position p = LastPosition; int days = p.DaysInPosition(bar); Description Intraday support functions and methods created [...]

Setting Priority for AtStop/AtLimit Orders — 1.2%

[...] LimitPriorityLong Syntax public static double LimitPriorityLong( this WealthScript ws, double p, int bar) public double LimitPriorityLong( double p, int bar) Parameter Description p Limit price bar Signal bar This function, created by Andrew Vishnyakov ( avishn ), helps to estimate which limit orders will realistically be hit first - without dropping to the intraday data level. According to its author, it gives quick and dirty approximation and is useful when scanning large data sets. IntradayFillPriorityEstimate [...]

CandleCode — 1.2%

[...] bar++) { if ( IsLastPositionActive ) { // 20% stop and 15% Profit Target Position p = LastPosition ; if (p.PositionType == PositionType.Long) { if ( ! SellAtStop (bar [...]

TASC 2020-06 | Correlation as a Cycle Indicator (Ehlers) — 1.0%

[...] SetBackgroundColor (bar, Color.FromArgb(30, Color.Red)); if ( IsLastPositionActive ) { Position p = LastPosition ; if (! ExitAtStop (bar + 1, p, p. RiskStopLevel , string .Format( "SL {0}%" , stopLoss))) { if (p.PositionType == PositionType.Long) { switch (p.EntrySignal) { case "Breakout" : if (downTrend) SellAtMarket (bar + 1, p, [...]

TASC 2012-09 | Developing a Multi-Level Strategy (Voznjuk) — 1.0%

[...] 100 ); bar < Bars .Count; bar++) { if ( IsLastPositionActive ) { Position p = LastPosition ; double Stop = p.PositionType == PositionType.Long ? p.EntryPrice [...]

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

[...] (bar + 1); else if (sell) ShortAtMarket (bar + 1); } else { Position p = LastPosition ; if ( bar - p.EntryBar < 1 ) continue ; else if (p.PositionType == PositionType.Long) { if (sell) { ExitAtMarket (bar + 1, p, "Reverse" ); ShortAtMarket (bar + 1); } else if ( Close [bar] < ema[bar] ) { if ( LRSNL[bar] < LRSNLSELL.Value ) ExitAtMarket (bar + 1,

HV — 1.0%

[...] ShortAtMarket ( bar+1 ); else BuyAtMarket ( bar+1 ); } else { Position p = LastPosition ; stop = (p.PositionType == PositionType.Long) ? p.EntryPrice [...]

NewMax — 1.0%

[...] new_low_s = NewMax.Series( Low ,period ); // Graphics HideVolume (); ChartPane newm_p = CreatePane ( 50, false , true ); SetPaneMinMax (newm_p, -100, 100); PlotSeries ( newm_p, new_high_s, Color.Green, ls, 1 ); // New High PlotSeries ( newm_p, new_low_s, Color.Red, ls, 1 ); // New Low // Trading for ( int bar = 20; bar < Bars .Count; bar++) { if (! IsLastPositionActive ) { if ( new_high_s[bar] >= 100.0 ) [...]

TASC 2014-06 | Slope Divergence: Capitalizing On Uncertainty (Kaufman) — 1.0%

[...] 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] >= 0 ? 1 : ms[bar] < 0 ? -1 : 0; return ( ps[bar] > 0 && ms[bar] < 0 ) ? Side.Buy : ( ps[bar] < 0 && ms[bar] > 0 ) ? Side.Sell : Side.NA; } void Colorize( int bar, Side side ) { SetBackgroundColor [...]

Stop/Limit Orders — 0.9%

[...] price, string signalName) public static bool SellAtStopLimit( this WealthScript ws, int bar, Position p, double price) public static bool SellAtStopLimit( this WealthScript ws, int bar, Position p, double price, string signalName) public static bool CoverAtStopLimit( this WealthScript ws, int bar, Position p, double price) public static bool CoverAtStopLimit( this WealthScript ws, int bar, Position p, double price, string signalName) public Position BuyAtStopLimit( int bar, [...]

TASC 2008-08 | Premier Stochastic Oscillator (Leibfarth) — 0.9%

[...] 0.9); xu2 = CrossUnder (bar, PS, 0.2); if ( IsLastPositionActive ) { Position p = LastPosition ; if ( p.PositionType == PositionType.Long ) { stop = p.EntryPrice * paramSLLong.Value; profit = p.EntryPrice [...]

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

[...] ,periodADX); var avgMAB = SMA.Series(c,mab); var adxLow = Lowest.Series(adx,adxLag); ChartPane p = obj. CreatePane (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, adx, adxTrend) [...]

WealthScript Techniques | Creating a Stop-And-Reverse (SAR) system — 0.9%

[...] ) ShortAtMarket ( bar + 1 ); } // Subsequent trades else { Position p = LastPosition ; if ( p.PositionType == PositionType.Long ) { if ( maXu ) { SellAtMarket ( bar + 1, p ); ShortAtMarket ( bar + 1 ); } } else if ( maXo ) { CoverAtMarket ( bar + 1, p ); BuyAtMarket ( bar + 1 ); } } } } } } Another example Our previous example featured CrossOvers/CrossUnders [...]

Variance Ratio — 0.9%

[...] Color.Silver; VarianceRatio vr = VarianceRatio.Series( Bars , Close , 20, 400); double sensitivity = 0.9; ChartPane vr_p = CreatePane (30, true , false ); PlotSeries (vr_p, vr, Color.Blue, ls, 1 ); DrawHorzLine (vr_p, sensitivity, Color.Red, ls, 2 ); RSI rsi_s = RSI.Series( Close , 14); ChartPane RSI_p = CreatePane [...]

TradingDaysBetweenDates — 0.9%

[...] // no future fundamental item } if ( IsLastPositionActive ) { Position p = LastPosition ; if (barsToNextEvent == 1) // Exit on day before ex-div { SellAtClose (bar, p, "Ex-div" ); } else { double Stop = p.EntryPrice * (1 - 15.00 / 100.0d); SellAtStop (bar + 1, p, Stop, "Stop Loss" ); } } else { if (barsToNextEvent > - 1 && barsToNextEvent <= 8) { BuyAtMarket [...]

EMMinus — 0.9%

[...] emm.FirstValidValue; bar < Bars .Count; bar++) { if ( IsLastPositionActive ) { Position p = LastPosition ; if ( CrossOver ( bar, emm, 19 ) ) TStopOn = true ; if ( p.MAEAsOfBarPercent( bar-1 ) < -8 ) CoverAtStop ( bar, p, p.EntryPrice*1.08, [...]

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.