|
Mel
 Veteran
   Posts: 235
Joined: 3/18/2006
User Profile |
Here is a Ehlers July indicator from TASC. It is a more accurate bandpass filter, because the past price impulses don't affect its calculation as much and it recovers more rapidly.
It requires arrays, which OL does not support. I simplified it for a fixed length lookback for truncation of 10 bars. It would be long and tedious to make a 100 bar simulated array, but if anyone wants to, be my guest.
Mel
Attached file : EhlersBPTrunc.txt (2KB - 340 downloads)
|
|
Mel
 Veteran
   Posts: 235
Joined: 3/18/2006
User Profile |
The red line is the regular BP filter, for comparison like in the article. You can comment it out and just plot the BPT line,
|
|
jawjahtek
 Member
 Posts: 37
Joined: 5/30/2006
Location: Georgia, USA
User Profile |
Thank you, Mel for posting this. For folks who haven't read the TASC article: the truncation method in the article and made possible in OT with Mel's code can be applied to improve ANY indicator that has an infinite impulse response (e.g., previous data values from long ago affecting the current indicator value, warm up needed for some indicators because previous data is not available with the initial bars).
Mel, I am curious if you want to rethink the warm up code that you plug into most of your OT code. Ehlers' claims that the truncation method could eliminate the need for a warm up period. I wouldn't go that far, but I intend to adopt the truncation method in many of my indicators and I will rethink what is needed for warm up. Ehlers' truncation method definitely impacts the concerns that Jim often expresses about warm up.
|
|
Mel
 Veteran
   Posts: 235
Joined: 3/18/2006
User Profile |
It contains warmup, but its real function it to speed up the processing when you have several IIR filters or other complex cycle stuff. You only compute the bars you need, not the whole loaded data set. Its easy to take out if you don't want it
[Edited by Mel on 6/29/2020 12:29 PM]
|