TradeStation Wavelet Transform Dll: Wavelet Functions
Description of function TSWVL.DLL
Works with every tick update
Function RUNWVL
defineDLLFunc: "tswvl.dll", FLOAT, "RUNWVL",LPFLOAT,int,float;
Returns value DeNoise
- Defines the block (should be formed using TradeStation)
- Number of scales (inside dll number of bars are calculated using formula Lookback = Power(2, Scales); )
- TraceHoldConstat (for example 3)
Function GETALLVALUES
defineDLLFunc: "tswvl.dll", FLOAT, "GETALLVALUES",int,int;
Depending on parameters ( I) returns value of Redundant Haar, Noise Sigma or filtered coefficients.
I. Coefficients number
- Redundant Haar
- Noise Sigma
- Filtered coefficients (often is similar to Redundant Haar(I) or has value 0 )
II. Value number of coefficient in a row, 1, 2, etc. depending on number of scales, if 8 scales then rows of values will be:
- (Redundant Haar) 8 scales + residue = 9.
- (Noise Sigma) 8 values
- (Filtered coefficients) like with Redundant Haar 8 scales + residue = 9.
Example:
| EasyLanguage: | {******************************************************************* Name: TS.Wavelet.Noise Analysis Type: Indicator Description: Example Indicator for Wavelet Transform DLL Used: tswvl.dll Provided By: Trade Smart Research (c) Copyright 2001 - 2004 www.tsresearchgroup.com *******************************************************************} Inputs: Price(close), Scales(4); vars: Lookback(0), Sum(0), count(0), Residual(close), dResidual(0); Array: ArrayPrice[511](0); {Declaration functions} defineDLLFunc: "tswvl.DLL", FLOAT, "RUNWVL",LPFLOAT,int,float; defineDLLFunc: "tswvl.DLL", FLOAT, "GETALLVALUES",int,int; {Amount of array cells, in this case of bars} lookback = power(2, Scales); {Creation of the array} for count = 0 to lookback-1 begin ArrayPrice[count] = Price[count]; end; {Call Dll and send to it of the array} Value1 = RUNWVL(&ArrayPrice[0],Scales, 3); Sum = 0; for count = 1 to Scales begin Sum = Sum + GetAllValues(2,Count); { In cycle are sum all obtained coeficents of scales} end; Plot1(Value1, "Noise"); {***** Copyright (c) 2001-2004 Trade Smart Research, Ltd. All rights reserved. www.tsresearchgroup.com ***** ***** Trade Smart Research reserves the right to modify or overwrite this analysis technique with each release. *****}
|
|