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.
[...] variable was 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 * [...]
[...] class MyStrategy : WealthScript
{
public class ArrayHolder
{ // current, old, older
internal double I, I2, I3;
internal double Q, Q2, Q3;
internal double R, R2, R3;
internal double Im, Im2, Im3;
internal double A;
internal double dB;
}
public DataSeries CycleFilterDC(DataSeries ds, out DataSeries sine, out DataSeries cosine)
{
double twoPi [...]
[...] Execute()
{
bool EnhanceResolution = paramEnhance.ValueInt == 0 ? false : true;
DataSeries HP = new DataSeries(Bars, "HP");
DataSeries Filt = new DataSeries(Bars, "Filt");
DataSeries DominantCycle = new DataSeries(Bars, "DominantCycle"); double Deg2Rad = Math.PI / 180.0;
double cosInDegrees = Math.Cos((.707 * 360 / 48d) * Deg2Rad);
double sinInDegrees = Math.Sin((.707 * 360 / 48d) * Deg2Rad);
double [...]
[...] A = advancers, D = decliners, TI = total issues, UV = up volume, DV = down volume, V = volume, H = new highs, L = new lows Climax Indicator (CLX) CLX is the number of symbols with upside breakouts in their On Balance Volume minus the number of symbols having downside breakouts in OBV . It oscillates around a zero line; negative readings is the number of stocks dropping in price on large volume, and vice versa. Look for confirmations or non-confirmations of price moves by the CLX. For example, of CLX drops on a general up day in the "Basic [...]
Syntax
public static double Correlation(this double ">"> x, double[ y, int n) public double Correlation(double ">"> x, double[ y, int n) Parameter Description x Array of double values (first data series) y Array of double [...]
[...] CreateParameter("Plot Width", 6, 2, 10, 1);
}
public class ArrayHolder
{
internal double Stoc, Num, Denom;
}
public void SwamiStochHeatMap(DataSeries ds, int plotThickness)
{
int r = 0; int g = 0; int b = 0;
string s = ds.Description + ")";
DataSeries swStoch = new DataSeries(ds, "SwamiStoch(" + s);
DataSeries ">49"> swamistoch = new DataSeries[49 ;
// Initialize array
ArrayHolder ">49"> ah = new ArrayHolder[49 ; [...]
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 bars, [...]
[...] corresponds to each intraday symbol! Corrections will be applied only to intraday data that comes in on new download requests. Split Adjust Intraday
Although IQFeed adjusts Daily bars for splits, they do not adjust intraday pricing. With this option selected, the Wealth-Lab IQFeed provider will maintain intraday prices adjusted too. Since IQFeed supplies only the last two splits, the Wealth-Lab provider uses an embedded historical resource of split data in order to adjust all intraday history. For example, as of 8/18/2020, QLD split 4 times since 2012. Without the split [...]
[...]
/// Camarilla Point calculation
///
public class Camarilla
{
#region Properties
private double _r1; public double R1
{
get { return _r1;}
set { _r1 = value;}
}
private double _r2; public double R2
{
get { return _r2;}
set { _r2 = value;}
}
private double _r3; public double R3
{
get { return _r3;}
set { _r3 = value;}
}
private double _r4; [...]
[...] Free trial users can not access this content.
Introduction
This document explains how to create new static data adapters for Wealth-Lab.Net. A static data adapter allows Wealth-Lab to load, chart, and backtest historical bar/volume data. The static data adapter itself is a .Net class that derives from the StaticDataProvider base class, and resides in a .Net library assembly (dll). To build a Static Data Provider, perform the following steps: Create a Class Library project in Visual Studio that will contain one or more Static Data Adapters. Add a reference to the [...]
[...] 1.0);
paramLookbackForStepPattern = CreateParameter("Lookback", 3, 1, 20, 1);
}
bool isInsideBody( int bar, double price ) {
return price 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 bar+1 ) && isInsideBody(bar, Open bar+1 ) && Close bar+1 > Open bar ;
bool way2 = (Open bar bar & Open bar+1 bar+1 ) && isInsideBody(bar, Open bar+1 ) && Close bar+1 > Close bar ;
bool way3 = (Open bar-1 > Close bar-1 ) && (Open bar bar ) && isInsideBody(bar, [...]
[...] Creating a Screener in the WealthScript Programming Guide), After that, you'll need to "Open Code in new Strategy Window" and make the following edit: // IS:
BuyAtLimit(bar + 1, High bar , ""); // CHANGE TO:
BuyAtStop(bar + 1, High bar + 0.10, "");
I'm not able to edit the optimization parameters (Default, Start, End, Increment) in the Optimization Control tab for rule-driven strategies. It's locked for rule-based strategies by design. You will have to "Convert to code-based strategy" or "Open Strategy code in new window". For advanced [...]
[...] description)
public static AroonDown Series(WealthLab.DataSeries source, int period)
public static double Value(int bar, WealthLab.DataSeries source, int period)
Parameter Description
source
Price series
Period
Indicator calculation period
Description The Aroon indicator developed by Tushar Chande, indicates if a price is trending or in range trading. It can also reveal the beginning of a new trend, its strength and also allows you to anticipate changes from trading ranges to trends. AroonDown and the [...]
[...] have to run the second script on the same symbol in the same scale. Script 2 will re-calculate the new value each day. Also, if you delete or change the position of the Trendline, you need to click "Go" again to remove/change the data for the Resistance Trendline in the file. Code
Script 1: Write Trendline Data to a file After you draw and name (or delete) your trendline named "Resistance", click "Go" to run this script, which writes the data to a file in your Wealth-Lab User \Data directory named MyTrendLineAlerts.txt . Repeat the process for any symbol and scale [...]
[...] Wealth-Lab's Tools menu. For example, tools like Market Manager and Neuro-Lab are already using it. To use the new API, create a class derived from the base class MenuItemHook . The class has one method that needs to be overridden : public abstract void AddMenuItems(IMenuItemAdder adder); This method gives you an instance of a IMenuAdder interface (the "adder" variable). You can call adder.AddMenuItem to add a menu to WL6.x: public override void AddMenuItems(IMenuItemAdder adder)
{
adder.AddMenuItem("Mini App", "&Tools", "Index-Lab ®",
new [...]
[...] 1);
paramPeriod = CreateParameter("MA Period", 8, 2, 20, 1);
}
protected override void Execute()
{
double rpu = paramRPU.Value;
int period = paramPeriod.ValueInt;
TRenko renko = new TRenko(Bars, rpu);
DataSeries dsOpen = new DataSeries(Bars,"R-Open"), dsHigh = new DataSeries(Bars,"R-High"),
dsLow = new DataSeries(Bars,"R-Low"), dsClose = new DataSeries(Bars,"R-Close");
DataSeries haOpen = new [...]
[...] opening price so that the basis price is the same as the execution price
Position BuyAtMarket(int n, string sigName = "")
{
if (n >= Bars.Count)
return base.BuyAtMarket(n, sigName); // create market order alert
else
return BuyAtLimit(n, Open n , sigName);
}
When I run a strategy in a Raw Profit mode, a warning message tells me that some trades were dropped because of insufficient funds. Why? It is possible in Raw Profit [...]
[...] CreateParameter("Line Width", 2, 1, 3, 1);
}
int getPipBar(DataSeries ds, PipInterval pi, double minMove, bool useLog)
{
int pip = 0;
double maxDiff = 0;
double delta, y;
for(int bar = pi.X1; bar pi.X1 , pi.X2, ds pi.X2 , bar );
delta = Math.Abs(Math.Log(ds bar / y));
}
else
{
y = LineExtendY( pi.X1, ds pi.X1 , pi.X2, ds pi.X2 , bar );
delta [...]
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, Position p, double [...]
[...] close together, the group is largely in agreement. One of the differences made by author BC Low is that new trend starts when signaled by TAC-DMI clusters converging at an extreme and then reversing as a group. On the contrary, multiple moving averages tend to expand as a group, following a change in price direction. As the Strategy code below illustrates, the convergence pattern of triple ADX, DI+ or DI- can be formalized pretty easily in WealthScript. Our “Convergence” routine with configurable thresholds highlights each of the four events on a chart triggered by combining [...]
[...] Traders' Tip text
This month's article by David Cline reminds of how hard is to invent something new in today's technical analysis. Seasoned readers may recall that a loosely related idea was featured in the March and September 2001 issues of Stocks & Commodities by Viktor Likhovidov who offered a candlestick coding technique. His quantitative approach called “CandleCode” expresses a candlestick value as a binary number, coding the body and shadows in different "bits" of the number. The idea behind the "CandleSticktistics" is to make candlesticks sort of binary, [...]
[...] paramYears.ValueInt;
var firstYearWithValidData = Date 0 .Year + howManyYearsToAverage;
var startBar = DateTimeToBar(new DateTime( firstYearWithValidData, 12, 31), false); //3. Only trade if the high frequency is 75 % or greater and the low frequency is 25 % or lower.
var thresholdHigh = paramThresholdHigh.ValueInt / 100d;
var thresholdLow = paramThresholdLow.ValueInt / 100d; //Average annual price
DataSeries avgYearlyPrice = AveragePrice.Series(BarScaleConverter.ToYearly(Bars)); //Average monthly prices (take AveragePrice or simply Close)
SetScaleMonthly();
DataSeries [...]
Syntax
public enum CalcEx.CallPutFlag { Call, Put };
public static double BlackScholes(this double S, double X, double D, double R, double V, CallPutFlag flag) public enum CallPutFlag { Call, Put };
public static double BlackScholes(CallPutFlag flag, double S, double X, double D, double [...]
[...] calculation
Description NewMax by DrKoch www.finantic.de 2004-06-22 This indicators finds new highs and new lows.
The value walks between -100 and +100.
If Price action reaches a new high relative to period Bars, the NewMax indicator is +100.
If Price action reaches a new low, the NewMax Indicator is -100.
Example This example illustrates how to plot the NewMax indicator and trade using it, based on a WL4 chartscript by Dr.Koch called "NewMax Trader". It enters a [...]
[...] data only exists in your database (and can't be edited in WL) Supports Market Manager
Creating a new DataSet
To work with a database containing some data, you need to create a new static DataSet first. Pick the appropriate Provider from the list of available ones (e.g. System.Data.OleDb/ODBC for Excel, Access, text files and lots more, System.Data.SqlClient for SQL Server etc.), compose a connection string, and you're ready for the next step. Usually, this is a no-brainer for the database guys, but should you feel lost in connection [...]
[...] trend change. In this case, the size of a correction wave may be taken as a factor when defining a new Wave 1: penetrations may only be considered significant if the preceding wave's extreme is broken by a multiple of the wave’s magnitude. In our opinion, this has a chance of improving overall performance of the technique in choppy markets, protecting from changing direction too soon. On a closing note, the companion SVEHLZZperc indicator has been added to TASCIndicators library. Conceptually, it's a variation of the well-known trailing reverse method with a twist [...]
[...] available through our Wealth-Data provider - the advancing, declining and unchanged issues as well as new highs/lows for AMEX, NASDAQ and NYSE. Here are the symbols: Symbol Description $AMEX_ADVN AMEX Advancing Issues $AMEX_DECLN AMEX Declining Issues $AMEX_UNCHN AMEX Unchanged Issues $NASDAQ_ADVN NASDAQ Advancing Issues $NASDAQ_DECLN NASDAQ Declining Issues $NASDAQ_UNCHN NASDAQ Unchanged Issues $NYSE_ADVN NYSE Advancing Issues $NYSE_DECLN NYSE Declining Issues $NYSE_UNCHN NYSE Unchanged Issues $AMEX_newhi AMEX New Highs $AMEX_newlo [...]
[...] Free trial users can not access this content.
Introduction
This document explains how to create new streaming data adapters for Wealth-Lab.Net. A streaming data adapter allows Wealth-Lab to connect to a streaming, tick-based, data feed and use this feed to update real time charts and quote windows. The streaming data adapter itself is a .Net class that derives from the StreamingDataProvider base class, and resides in a .Net library assembly (dll). To build a Streaming Data Provider, perform the following steps: Create a Class Library project in Visual Studio that [...]
[...] _atClose;
private StrategyParameter _dayOfMonth;
private DateTime _endofMonth;
private Queue _priceQueue = new Queue(); // FIFO queue
private double AverageQueue()
{
if (_priceQueue.Count == 0) return 0;
double sum = 0;
foreach(Object obj in _priceQueue)
sum += (double)obj;
return sum / _priceQueue.Count;
}
public void SetNextMonth()
{
if (_dayOfMonth.ValueInt == 0) return;
int y = _endofMonth.Year;
int m = _endofMonth.Month;
m++;
if [...]
[...] WealthLab.Indicators; namespace WealthLab.Strategies
{
public class FractalDim : WealthScript
{
StrategyParameter _n;
StrategyParameter _per; public FractalDim()
{
_n = CreateParameter("N", 30, 10, 60, 2); // An even number
_per = CreateParameter("Average Period", 20, 10, 55, 1);
} protected override void Execute()
{
HideVolume();
int N = _n.ValueInt;
int avPer = _per.ValueInt;
DataSeries avg = AveragePrice.Series(Bars);
DataSeries smooth [...]