DYO: Triple Delay Line example (detrend)
|
Q: I wish to write a DYO that will implement the Triple Delay Line Canceller (a detrender). The detrended amplitude of all cycle components is almost the same. Therefore, the detrended waveforms retain the cyclic characteristics of the original waveforms with higher fidelity.
The EasyLanguage Code to implement the Triple Delay Line Canceller as a detrender is:
Inputs: Price((H+L)/2);
Vars: Detrend(0);
Value1 = Price + .088*Value1[6];
Value2 = Value1 - Value1[6] + 1.2*Value2[6] - .7*Value2[12];
Detrend = Value2[12] - 2*Value2[6] + Value2;
Plot1(Detrend, "Detrend");
Thank you very much for your help. I am still a novice at writing DYO Studies.
A: I think this is the implementation. Please double check it with a plot from your TradeStation.
Template: 1352-TripleDelay
The implementation uses two DYOs, and is rather complex. With the formulas you have provided, you probably would be able to follow along and see the steps.
Template: 1352-TripleDelay
Last modified 8/8/08 1:41 PM
|