{******************************************************** Non-decimated Haar Wavelet Smoothing Indicator Family Copyright (c) 2002 Trade Smart Research Group Notes: The math is based on Multiresolution Analysis of time series www.multiresolutions.com ********************************************************} Inputs: Price(MedianPrice), {a price series} NSigma(2); {threshold value signal / noise} vars: Lookback(0), count(0); {definition of variables} Array: ArrayPrice[16](0); {definition of Array} defineDLLFunc: "tswvl.DLL", FLOAT, "RUNWVL",LPFLOAT,int,float; {definition dll} defineDLLFunc: "tswvl.DLL", FLOAT, "GETALLVALUES",int,int; for count = 0 to 15 begin {the task of elements of Array} ArrayPrice[count] = Price[count]; end; Value11 = RUNWVL(&ArrayPrice[0], 4, NSigma); {call dll function} Value1 = value11 - GetAllValues(3,1); Value2 = value1 - GetAllValues(3,2); Value3 = value2 - GetAllValues(3,3); Value4 = value3 - GetAllValues(3,4); Plot1(value1, "1"); {drawing of charts} Plot2(value2, "2"); Plot3(value3, "3"); Plot4(value4, "4");
|