Overview: Wavelet Noise
Example 2. Example 2 shows sumarized noise on all Wavelet coeficients.
It can be assumed that price = signal + noise.
Wavelet decomposition from price = decomposition of signal + decomposition of noise.
Summarized noise on all wavelet coeficients is showen on the chart.
As follows signal is price with subtracted noise.
This example shows advantage of Wavelet transform from other methods as Wavelet transform eliminate different components of signal, noise and etc.

| eSignal Formula Script: | /******************************************************************* Name: TSE.Wavelet.Noise Analysis Type: Indicator Description: Example Indicator for Wavelet Transform DLL Used: tsewvl.dll Provided By: Trade Smart Research (c) Copyright 2001 - 2004 www.tsresearch.com *******************************************************************/ var v,lookback; /* Defining DLL */ var d = new DLL("tsewvl.dll"); /* Function Declaration */ d.addFunction("runwvl", DLL.FLOAT, DLL.STDCALL,"RUNWVL", DLL.FLOATARRAY,DLL.INT,DLL.FLOAT); /* Preparing parameters and array*/ function preMain() { setPriceStudy(false); setStudyTitle("Wavelet Noise"); setCursorLabelName("Noise", 0); setDefaultBarStyle(PS_SOLID, 0); setDefaultBarFgColor(Color.red, 0); setDefaultBarThickness(1, 0); setPlotType(PLOTTYPE_LINE, 0); ArrayPrice = new Array(512); var fp1 = new FunctionParameter("Scales", FunctionParameter.NUMBER); fp1.setLowerLimit(1); fp1.setUpperLimit(8); fp1.setDefault(4); var fp2 = new FunctionParameter("Source", FunctionParameter.STRING); fp2.setName("Source"); fp2.addOption("Close"); fp2.addOption("High"); fp2.addOption("Low"); fp2.addOption("Open"); fp2.setDefault("Close"); } function main(Scales,Source) { if (Scales==null) Scales=4; if (Source==null) Source="Close"; /* determinig length of array */ lookback=Math.pow(2,Scales); /* determinig source */ aSource=getValue(Source,0,-lookback); nBarIndex = getNumBars()+getCurrentBarIndex(); /* filling array */ if (nBarIndex >lookback) { for (x=0; x<lookback; x++) { ArrayPrice[x] = aSource[x]; } /* calling functoin in dll */ v = d.call("runwvl",ArrayPrice,Scales,3); } else { v=0 } return v; } |
|