Building a trading system using digital low-pass filters - page 18

 

grasn

:-) well, out of spite, I'll show you the Kalman filter too. It's based on ACF analysis. The window is minutes last week 7200. The input is just a series of prices, no optimisation. Thanks for the link.

The methodology is as follows. Analysis of ACF - I take out ACF parameters into the model and put it into Kalman filter, it gives forecast and current estimate. I have written a program, I may process incoming prices in real time in Matcadet and manage MT, if necessary I can share.

 

to Prival

I don't understand what is your filter's prediction? Your fast and slow filters are terribly late. Where's the forecast? Tell me.

 
grasn:

to Prival

I don't get it, what is your filter's prediction? Both fast and slow filters are terribly late. Where is the forecast? Tell me.


"Random Flow Theory and FOREX

"Random Flow Theory and FOREX

"Random Flow Theory and FOREX

and here's the model + filter in Matcadet

"Random Flow Theory and FOREX


all here in this thread.

 

To Prival

"Too bad we never got to hear from the head of the transport department." :о)))

Prival, a huge request, show us how it works similarly for a self-taught person, like,
  • here's the baseline,
  • here we have fulfilled the prediction,
  • here is a fact in fact.
Very much please...

PS: the links don't predict anything (in my humble ignorance).
 

Hi all!

Yes, a funny function in Matcadet - predict, - really predicts the right number of steps ahead!

Let's try to make a prediction for n bars ahead on each bar. To have something to compare it with, let's average a price series (thin red broken line) by a symmetrical (capable of looking into the "future") 1-st order Butterworth LF filter (thick red line), and mark the real averaging (we can't look into the "future") with a thick blue line. We see a noticeable FZ (lag), it should be so. Now let's attach our predictor predict with a forecast horizon of 40 bars (thin black line) to the lagging indicator - it really predicts the behavior of the lagging indicator ahead of time! True, it has become less stable.

What will happen if we increase the forecast horizon? You can see the answer in the attached animation, the thin blue line is the LPF with a smoothly decreasing averaging window

Files:
1.zip  130 kb
 

I think the subject is

Took MathLog(Close[i]/Close[i+1]) /// as understood in MQL4

Decomposed it into harmonics (Thanks a lot for klot library)

I have created an Expert Advisor based on the indicator (also thanks to klot), although it is slightly modified.

The essence of this Expert Advisor has 8 harmonics

If the first one is greater than zero line (IMHO), we consider it to be a "long term" trend upwards

If the third harmonic crosses the zero line from above downwards, we consider (IMHO) that the trend has changed at the "lower" level.

Correspondingly, on the contrary with a bai

Here is a picture from the tester

Set of all that I used in the archive

I admit that I chose parameters of stoploss profit in the optimizer

A few lines in the indicator have been commented out

int start()
  {
   int    counted_bars=IndicatorCounted();
   counted_bars=100;
   double m;
   for(int i=M-1; i>=1; i--)
   {
      //aa[i]=iOpen(NULL,0,i);
      //aa[i]=Close[i]-Close[i+1];
      //aa[i]=Open[i+1]-Close[i];
      aa[i]=MathLog(Close[i]/Close[i+1]);
      //aa[i]=MathLog(Close[i]/Open[i+1]);
   }

You can comment each line one by one and check what may "work", you can do your own comment ...

Files:
experts.zip  42 kb
 
to Neutron

Seryoga, hi, long time no see!!! Maybe you can briefly explain to me what the filter predicts for you and Prival? Thanks in advance, did you really make AF???

Да, забавная функция в Маткаде - predict, -действительно предсказывает на нужное количество шагов вперёд!

Glad to help. And you don't happen to have a detailed algorithm for its implementation? :о)

 
Neutron:

Yes, the fun feature in Matcadet - predict - really predicts the right number of steps ahead!

What happens if you keep increasing the forecast horizon? You can see the answer in the attached animation - the thin blue line is the LPF with a gently decreasing averaging window


Hi Sergei !

But what happens if you don't widen the forecast horizon but let predict over the result, i.e. on the thin black line ?

 
Prival:

grasn

:-) well, out of spite, I'll show you the Kalman filter too. It's based on ACF analysis. The window is minutes last week 7200. The input is just a series of prices, no optimization. Thanks for the link.

The methodology is as follows. Analysis of ACF - I take out ACF parameters into the model and put it into Kalman filter, it gives forecast and current estimate. I have written a program, I may process incoming prices in Matcadet in real time and manage MT, if necessary I can share.




I want to understand why these lines are better than "smart" MA?

 
I want to understand how these lines are better than the "tricked out" MAs?

That's what I'm wondering...

Reason: