What is the best way to deal with the filter coefficients? - page 6

 
Alexey Volchanskiy:

Simple MA with length 5 is essentially a FIR filter with coefficients {0.2, 0.2, 0.2, 0.2, 0.2}
Of course. If you mean school, they already know how to calculate the mean value on an interval. They can solve even more complicated problems.) The course contains problems, where an indirectly weighted average is proposed, and weights are determined by ourselves.
 
Alexey Volchanskiy:

An oscillator is already a bandpass or upper-pass filter. Bingo, take a bandpass filter, calculate it on your knee in a minute, and give it to the Market as a mega-graphic super oscillator by Volchansky! )) The main thing is to color the curve sections in canary colours )))
I think the time of Juriks has passed. The market has already been flooded with miracle indicators. But buyers will be found)).
 
Yuriy Asaulenko:
Of course they do. If you mean school, they already know how to calculate the average on an interval at school.

I hope the USE hasn't got to the average yet ))
 
Alexey Volchanskiy:

I hope the USE hasn't reached the average yet ))

It reminds me of an old joke.

An exam on the history of the Communist Party of the Soviet Union. A student cannot answer a single question.

The teacher pulls out a portrait of Karl Marx and shows the student

- That's Karl Marx, isn't it?

 
Maxim Dmitrievsky:

I see, it's the same subject in another interpretation.
Alexey Volchanskiy:


This is what I was talking about. Here is the formula of FIR filter I use myself. But I have already written - everything depends on coefficients. Yes, they are given, but without any description, so I can't judge right away. But there is an advertisement of the company ))

I'm referring to this piece of the article

----------

For example, you could try to build code in MQL5 for a digital filter like Finware's FATL.

In general terms the formula for calculating a digital filter is:

FILTER = SUM (K(i) * CLOSE (i), FilterPeriod)

where:

SUM - sum;

K(i) - weighting factor;

CLOSE (i) - closing price of the current bar;

FilterPeriod - number of bars for averaging.

I don't know much about filters, maybe you can advise me? The RSI indicator "compares the absolute value of growth of currency pair's price in a certain period of time with its fall over the same period". I have not found the formula of its calculation yet. But it seems that it cannot be presented in the form of SUM (K(i) * CLOSE (i)), because the weights depend on the sign of the difference of neighboring CLOSE (i). Do I understand it correctly?
Валютные пары рынка Форекс и их особенности
Валютные пары рынка Форекс и их особенности
  • vsemproblemam.net
На фондовом рынке торгуют акциями компаний. Вы можете покупать или продавать акции. Но как быть, если вы хотите покупать и продавать валюту? На фондовом рынке акции компаний являются товарами, а валюта, которую вы платите, чтобы купить их - это деньги. Те же правила действуют и в любом другом виде торговли. Вы платите деньги, чтобы купить...
 
Vladimir:
I'm not familiar with filters, maybe you can give me a hint? RSI indicator "compares the absolute value of the currency pair price rise over a certain period of time with its fall over the same period". I have not found the formula of its calculation yet. But it seems that it cannot be presented in the form of SUM (K(i) * CLOSE (i)), because the weights depend on the sign of the difference of neighboring CLOSE (i). Do I understand it correctly?


RSI has nothing to do with digital filters in their pure form. You are right, it cannot be represented as a highlighted expression. It's also difficult to derive the formula as there are at least two steps. See the comments in the code.

1. Get the sum of SumP increments and SumN decreases for the RSI period

      double diff;
//.......
      double SumP=0.0;
      double SumN=0.0;
      for(i=1;i<=ExtPeriodRSI;i++)
        {
         ExtRSIBuffer[i]=0.0;
         ExtPosBuffer[i]=0.0;
         ExtNegBuffer[i]=0.0;
         diff=price[i]-price[i-1];
         SumP+=(diff>0?diff:0);    // накапливаются приращения цены в соседних барах
         SumN+=(diff<0?-diff:0);   // накапливаются убывания цены
        }

Then they are further processed excruciatingly, but this step is the main one.

 
Thank you
 

It's funny that the material is discussed before it's published :-)

Alexey, interesting topic, I wish you a speedy completion of the article!

 
Dennis Kirichenko:

It's funny that the material is discussed before it's published :-)

Alexey, it's an interesting topic, I wish you to finish the article as soon as possible!


Denis, it was quite unclear what to do with these coefficients. Now it is clear - they are ready. The simplest solution is the best.

I'll definitely finish it in March, I'm already slowed down )

 
Alexey Volchanskiy:


Why is the MACD bandpass? The difference of two Exponential MA is taken, it is shown as a histogram (vertical bars), then a slightly modified Simple MA is taken from the difference and shown as a dashed line.

You're wrong about wavelets, I do them. You cannot simulate a wavelet with digital filters. You can very roughly mimic the Fourier transform with bandpass filtering. But FFT is better and faster.

Perhaps my next article will be on wavelet filtering, where latency is minimal, incomparable to DF.

It's more a matter of terminology (or philosophy).

Macd is considered a difference of LPF, but at the output we have a filtered trend and an HF component, rather than a bandpass filter.

Again, can wavelets be considered a special case of filters. Does the spectrum of the original signal change? It changes, sort of like a filter.

It would be interesting to read, there hasn't been anything on this topic for a long time.

Reason: