Trading Strategies Based On Digital Filters - page 49

 
clahn04:
The ATCF document is on this thread. Take a valley. cl

So if a have a valley at 30, a peak at 20 and another valley at 10, i could choose P1=30 and D1=10? is it right?

 

Hi guys,

I just emerged minutes ago from Codebreaker 3d and it was, wow! better than a Hollywood movie script .

What I have understood from the 3d is:

a) I know nothing about DSP compared to Codebreaker !

b) One could keep on reading and getting deeper in each one of his posts (and the ones from a bunch of really clever guys in the 3d) for weeks for the solely sake of maths.

c) it seems to me that he is far from the holy grail, anyway, as recent posts testify that he is trying to get into that intriguing thing of variable timeframes, so the problem is the same as ever: you must change either the cutoff frequency of your digital fiters in a fixed timeframe or change the timeframe and keep using a fixed cutoff frequency.

That said,

there is a lot of ideas in that 3d and work to be done. I would like to focus a bit more on the phase lag of my filter (which is a linear phase FIR), and also I would like to investigate on the "radar clutter filter" that, I believe, can be the real "edge" (at least the idea behind it is sort of "magic").

Finally, I must admit that a variable timeframe has some advantages over a variable filter. The major that I can figure out is that it's way simpler (in theory) to change the timeframe (i.e. the length of the bin of tick data you merge) than the filter, and that it can be a continuous process while the change of the filter has more difficulties and discontinuities.

I have dealed with filter transitions in my work with MESA/ACTF and it is not trivial if you want a continuous, tradable filtered signal throughout the transition (i.e. if you use the slope for trend detection)

 

practical approach

richcap:
Hi guys,

I just emerged minutes ago from Codebreaker 3d and it was, wow! better than a Hollywood movie script .

What I have understood from the 3d is:

a) I know nothing about DSP compared to Codebreaker !

b) One could keep on reading and getting deeper in each one of his posts (and the ones from a bunch of really clever guys in the 3d) for weeks for the solely sake of maths.

c) it seems to me that he is far from the holy grail, anyway, as recent posts testify that he is trying to get into that intriguing thing of variable timeframes, so the problem is the same as ever: you must change either the cutoff frequency of your digital fiters in a fixed timeframe or change the timeframe and keep using a fixed cutoff frequency.

That said,

there is a lot of ideas in that 3d and work to be done. I would like to focus a bit more on the phase lag of my filter (which is a linear phase FIR), and also I would like to investigate on the "radar clutter filter" that, I believe, can be the real "edge" (at least the idea behind it is sort of "magic").

Finally, I must admit that a variable timeframe has some advantages over a variable filter. The major that I can figure out is that it's way simpler (in theory) to change the timeframe (i.e. the length of the bin of tick data you merge) than the filter, and that it can be a continuous process while the change of the filter has more difficulties and discontinuities.

I have dealed with filter transitions in my work with MESA/ACTF and it is not trivial if you want a continuous, tradable filtered signal throughout the transition (i.e. if you use the slope for trend detection)

Hi,

Yes, Codebreaker thread is very interesting. However as a lot of FOREX threads it's lacking of practical information confirmed by statistics, a lot of theories but not so much verification in simulated or real trading or it is not published.

Regarding your system based on MESA so actually what do you expect from members ? You gave a code but I believe it would be much usefull to have block diagram of this system together with parameters and trade statistic otherwise is difficult to discuss. That of course if you want to keep it public

publish thing like this otherwise is difficult to go forward.

I've seen one post from you with MESA cycles in real time. Than a question.

Do you make a Bartel tests to verify which cycle is valid ??

Than do you build combined cycle and how ??

If you are interested I post the latest code for S/N meter using John Ehlers method, than it can maybe improve your system.

I posted also non-stationary chirp signal. Is your system able to make money on it ??

Krzysztof

 

clarification

richcap:
You're right Krzysztof,

I have published only the digital filter (FIR, linear phase) I use in my system, not the system itself.

To be honest, I'm trying to understand whether it is worth publishing the whole thing. I like the idea of clever guys stress-testing my system and improving it. I don't like very much the idea of putting online some hundreds (or maybe thousands) line of code that no one will never look at.

I would like to share:

a) my MESA library for metatrader

b) my MESA indicator that plots in a separate chart the cutoff frequencies to be used as input for the creation of the adaptive FATL-SATL (and others), bar by bar. This could be enough to start testing and investigating how main frequencies found by MESA vary in the time domain, bar after bar. I mean, 2 are the lines of investigation: 1) about MESA reliability and 2) about dominant cycle change in the time domain (which seems to me too much fast for a profitable use for trading)

c) finally, my adaptive FATL-SATL and other indicators based on the above

d) the Expert advisors I have written to implemente ACTF strategy (which is the weakest part of all my work)

I attach hereafter my mesa library (R-MESA.mq4) that must be installed in experts->libraries, and the two indicators you can see published at #464

Please note that the label "R-MESA" has nothing to do with R-Mesa automatic trading from mesasoftware.

Hi,

So what i understand from your description all those indicators from functional point of view simple duplicate DFG program (I hope you know DFG)

Is that correct ?? Do they contain any additional funcionality beyond real time output ??

So there is no detrending module and no denosing module ??

Than if they are duplication of DFG actually why you created them ??

You simple didn't know about DFG or there was any other reason for example that you wanted to have adaptive system in real time ??

Personally i think this thing becomes very complicated now because without

proper output control (output === strategy results) discussion about e.g.

MESA cycles are bit out of topic because we are not sure if it will make money as a trading strategy anyway. And when we add detrend and denoise everything can change.

Unless you only want to test MESA here but still point above applies.

Krzysztof

 
fajst_k:
Hi,

So what i understand from your description all those indicators from functional point of view simple duplicate DFG program (I hope you know DFG)

Is that correct ?? Do they contain any additional funcionality beyond real time output ??

Well, I guess it's not bad to have a piece of software that you can look into the code and know (and even change) what it does in realtime, don't you?

Anyway, if you had looked into the code (which I suspect you did not) you would have seen that there are some facilities over DFG (apart from being integrated in the platform used by many people for forex trading) , such as automatic detection of main peaks and valleys of MESA spectrum.

So there is no detrending module and no denosing module ??

Perhaps someone who believes that detrending and denoising is vital (which is not me), could integrate the library with detrending and denoising?

Than if they are duplication of DFG actually why you created them ??

You simple didn't know about DFG or there was any other reason for example that you wanted to have adaptive system in real time ??

Personally i think this thing becomes very complicated now because without

proper output control (output === strategy results) discussion about e.g.

MESA cycles are bit out of topic because we are not sure if it will make money as a trading strategy anyway. And when we add detrend and denoise everything can change.

Unless you only want to test MESA here but still point above applies.

Krzysztof

To be honest with you, that's not the kind of reply that make me think it is a good idea to keep on sharing my work.

Bye

 

way forward

Hi,

Sorry to upset you but for several years I worked with finding faults in software

either on the code level and also on the system level and I have certain schemes of thinking.......so i wanted to find the logic and current status.

So the simplest way to go forward is that I will find the most efficient cycles

from money point of view using NOXA CSSA than we can compare with MESA cycles. I think I can turn off detrending in NOXA so we will be aligned. Just tell me the data set.

Krzysztof

 
richcap:
You're right Krzysztof,

I have published only the digital filter (FIR, linear phase) I use in my system, not the system itself.

To be honest, I'm trying to understand whether it is worth publishing the whole thing. I like the idea of clever guys stress-testing my system and improving it. I don't like very much the idea of putting online some hundreds (or maybe thousands) line of code that no one will never look at.

I would like to share:

a) my MESA library for metatrader

b) my MESA indicator that plots in a separate chart the cutoff frequencies to be used as input for the creation of the adaptive FATL-SATL (and others), bar by bar. This could be enough to start testing and investigating how main frequencies found by MESA vary in the time domain, bar after bar. I mean, 2 are the lines of investigation: 1) about MESA reliability and 2) about dominant cycle change in the time domain (which seems to me too much fast for a profitable use for trading)

c) finally, my adaptive FATL-SATL and other indicators based on the above

d) the Expert advisors I have written to implemente ACTF strategy (which is the weakest part of all my work)

I attach hereafter my mesa library (R-MESA.mq4) that must be installed in experts->libraries, and the two indicators you can see published at #464

Please note that the label "R-MESA" has nothing to do with R-Mesa automatic trading from mesasoftware.

Richcap,

Firstly, I'd like to thank you for sharing what you have created. I didn't realize what it was you posted until moments prior to me starting this comment. It's this kind of R&D that had this thread ablaze w/ the fire of progress, burning thru all the dross that is the daily mundane booty chatter of this and most other forums. It is mighty powerful, indeed. Those that have been following this thread would be wise to do a double take on what you've brought to the lab bench

I don't think Krzysztof was attempting to be malicious in his reply. After reading it a few times, seems a couple of words and sentence structures just gave the impression of such. Please correct me, if I'm wrong, Krzysztof.

Now, I am by no means, an authority on the topic of DSP. I've frequented this thread, as a pupil, moreso than almost any other. However, I have learned a few things that I think might be of value to you in your pursuit. You may already know everything I'm sharing w/ you and if that is, in fact, the case, please don't take it as patronizing.

1. MESA has been determined to be one of the less ideal methods of spectral analysis because of it's inability to identify frequencies in above average noisy data scenarios (which is what the price data from financial markets has been determined to be). Goertzel's Algorithm, on the other hand, might be a better choice. Please reference the Meyer's Analytics "paper's page", artictle titled "Mesa vs. GDF"

2. There is further discussion on the aforementioned topic (indicators included) in this very thread, starting @ post 225.

3. Sergey Iljuhkin, creator of the DFG software, created something very similar to the indicator you posted (which, I think, means you're on the right track ), complete w/ library and all, posted here by NewDigital. I've used it in the past. Very good, IMHO. Might be worth a look.

4. Krzysztof was accurate in his assessment of CB's thread. I know a couple of folks who've collaborated w/ CB and they confirmed that he will share only pictures and theories, nothing concrete. That being said, those on this thread, like you, clahn04, Simba, dvarrin, and fajst_k are the communal type and are willing to exchange thoughts and the resulting products openly. Please don't allow that flow of progress to be halted or else the thread will experience another lull in forward movement.

I have a setup that I've been using and it only has 2 indicators: un-optimized FTLM_KG and STLM in histogram form, both smoothed via a Jurik price proxy to remove some of the noise present, resulting from the fact the two indicators are not tuned to the pair and t.f. Nothing amazing and depending on the settings may lag a bar every now and then, but effective enough until I can digest more information and excrete something better i.e. easily tunable FTLM and STLM indicators. Screenshot attached.

Best Regards,

F_F_L

Files:
my_setup.gif  33 kb
 

Thank you f_f_l for you words, I really appreciate.

I know that we all are striving for the ultimate goal, that is to have a tool to make money, but I ultimately think that it is NOT possible to have a blackbox filling your bank account while you are on the beach.

So, what is mandatory is to know what the box is doing. Better if you have built it on your own, or with some colleagues.

It is hard to build something from scratch, it's much easier to "try and buy", but I am almost sure that it is not the right way. So what I, and probably "we all", need is passion and intellectual stimulus.

Thats the main reason why I am publishing my work: to contribute and to revive the passion that animated this thread.

And your words, f_f_l, are exactly those that are needed.

I attach an indicator that will be used in adaptive fatl-satl indicator (and others). This one extracts the cutoff frequencies (P1 and D1) to be used by adaptive digital filters, bar by bar. It uses the same R-MESA library as the others.

Good night

 
fajst_k:
Hi,

Sorry to upset you but for several years I worked with finding faults in software

either on the code level and also on the system level and I have certain schemes of thinking.......so i wanted to find the logic and current status.

So the simplest way to go forward is that I will find the most efficient cycles

from money point of view using NOXA CSSA than we can compare with MESA cycles. I think I can turn off detrending in NOXA so we will be aligned. Just tell me the data set.

Krzysztof

Hi Krzysztof,

I understand why you were skeptical. You don't know me and there are so many lamers out there...

By the way, as I already said, I always like to look under the hood. That's why I decided to implement MESA instead of using a third party software. That's why I have my own FFT library (which is faster and more reliable respect to the one I found some months ago for metatrader) as well as my digital filter libraries (for metatrader too).

I decided to go metatrader because I'm comfortable with it and the porting of available algorhithms is quite easy. Also, I dont want to get stuck in painful integration issues (like the ones with neuroshell, or with matlab and so on).

Now, I'm pretty sure that the MESA library I have published is free from important bugs and I would like it to be used by the forumers to get into MESA verification for forex time series. I would like not to dismiss MESA because of a bad implementation or bad use (e.g. without reportedly "very important" detrending and denoising).

So I have modified my indicator R-MESA_instant spectrum.mq4 (v.1.2, here attached) to take noise into account (for now it doesn't have detrending).

Every body now can try MESA spectral analyser from the chart he is viewing with metatrader with a pre-processing of the time series ( OHLC and median) by some filters available (kalman, JMA, nonLagMA, SMA, etc). It is also possible to add a sinusoidal signal of given amplitude and frequency.

I have added to the same indicator the print of first "n" peaks and valleys.

I have already done some tests (which I will post later).

One of the nice things with MESA is that you can have the resolution you want. So you can "zoom" in an band of interest (that's what I have done and I will show you, if anybody is interested of course)

See you soon ;-)

PS - I will try your datasets on GOLD soon

 

Hi Richcap,

Personally I think you made a great job and you are a God programmer !!!

I would like to contribute more with your tests but I'm simple too busy !!!

I finshed with NOXA on TRADE2WIN but have next project and would like to conclude it first.

My opinion about it is simple from several years of expirience of test very complex software systems: You touch in one place and you don't have any chances to imagine what side effects it will cause and everythiing must be verified and double checked. This is a reason that i mentioned test strategy results as a final output and this is the reason that I'm saying that NS is better because it allows to keep everything under control.

Personally I think if you create proper envirnoment for tests with MT4 only

(so with EA) than you can get also results. Disadvantage is that you have limited or no access to optimization function which can make life very easy

and wider the view of your system.

Try also on CHIRP signal, it is non stationary and MESA will get crazy I think.

But if everything done properly you have a chance to have fully adaptive system with filters in real time as you can change parameters of filters in real time as well !!! Than the performance would be interesting .....

Krzysztof