Tendential planimetry method - page 10

 
Prival:

I haven't read the whole thread, but my first impression. Colour is the 3rd coordinate. You need to build XYZ, and analyze where we are in the ravine, crawling up the ridge or coming down from it. Maybe that will help you. Although I think someone should have suggested that already.

Ideally, the task of indicator is to give the required information in a maximum compressed form (without significant losses, of course) with the minimum possible computational cost. According to the first criterion the 3D image is good (for visual perception), but according to the second one it is a bit tense.
 
lna01:
Prival:

I haven't read the whole thread, but my first impression. Colour is the 3rd coordinate. You need to build XYZ, and analyze where we are in the ravine, crawling up the ridge or coming down from it. Maybe this variant will help you. Although I think someone should have suggested it.

Ideally, the task of the indicator is to output the required information in the most compressed form (without significant losses, of course) with the least possible computational cost. For the first criterion the 3D picture is good (for visual perception), but for the second one it is a bit tense.

I agree with you, moreover to determine the place where we are in the ravine or on the peak, most likely we will have to apply method of gradient descent or ascent, and this is an additional load. I think there are no easy ways, but who has an easy time now. Maybe only my boss, because a general is not a title, but happiness :)
 

to Candid

So what's the problem? I've already posted the template for indicator (with profile function calculation) in this thread. The profile function used by grasn is a special case of that code. We only need to add the procedure of searching for condensations (i.e. minima of this function) and the indicator is ready. The procedure suggested by grasn can be inserted as well.

I have not understood your algorithm, but it may be my special case. I finally got my hands on it and made the variant with difference normalization. I've made some minor adjustments, every slice, every view:


is smoothed out, and the local lows below the average are taken away. The end result is a picture like this:

Worms in its purest form:

Plus there is a third coordinate - namely the value of "density" by which you can probably draw meaningful conclusions.

PS: The described algorithm is quite simple and it is unlikely to be difficult to transfer it to MT, and the amount of calculations here does not play a key role. One can draw an unsubstantiated conclusion by looking at the 3D picture. You can see that at the "today" mark, which is 1400 counts (the "n" axis), the worms clearly have a lower "density" value than the "strong" zones (the greener dots). And as shown in previous posts, "tomorrow" price starts up and does not return to the worms. Maybe, eugenk meant it?

to eugenk

Judging by the silence, you probably got your paycheck and we lost you for a while. When it will be over again (this is the most predictable of all natural phenomena) answer, please, to my simple question - why do you need these worms and what do you want to do with them?

 
grasn:

I didn't understand your algorithm so precisely, but it's quite possible that mine is a special case.


I know you don't look at my code :), I just told the man that part of the work on such an indicator for MT has already been done and laid out
 
lna01:
grasn:

I didn't understand your algorithm so precisely, but it's quite possible that mine is a special case.


That you do not look my code I know :), I simply have prompted the person that the part of work on such indicator for MT is already made and laid out
I tried to figure out the 'Tendential Planimetry Method' here ( Ina01 03.11.2007 16:20) :o))))
 
grasn:
I tried to understand here 'Method of Tendential Planimetry' ( Ina01 03.11.2007 16:20) :o))))

You should have here 'Method of tendential planimetry' (lna01 02.11.2007 11:35) : )

A correctly built indicator includes the code that provides the single processing of history and incoming ticks, i.e. it always contains the loop on history. If you are interested in the algorithm, you can find this cycle in the code and see what's inside it.

    Sum = Close[sh+1];
    SMA[1] = Sum;
    for (i = 2;i<=SMANumber;i++) {
      Sum += Close[sh+i];
      SMA[i] = Sum/i;
    }
// Предыдущий код обсуждён с Matemat'ом в предыдущих постах. Собственно, это эффективный алгоритм
// расчёта значений простых скользящих средних на баре с индексом sh+1
// Теперь сортируем массив этих значений, после этого значения будут идти в том же порядке, что и на графике. 
// Если не нравится, можно закомментировать эту строчку
    ArraySort(SMA);
// Теперь рассчитываем функцию профиля, для визуальной оценки загоняем значения функции в индикаторный буфер
// Сама функция - разность значений SMA. Если бы не было сортировки, это была бы 
// разность SMA с периодами i+hf и i-hf, с сортировкой это интервал цен, занимаемый 2*hf+1 SMA в том порядке, 
// в каком они идут на графике, SMA[i] - медианное значение интервала.
    for (i = hf+1;i<=SMANumber-hf;i++) {
      D[sh+i] = SMA[i+hf] - SMA[i-hf];
    }

To build the second image in the post you're interested in, the code was modified.

    for (i = hf+1;i<=SMANumber-hf;i++) {
      dSMA = SMA[i+hf] - SMA[i-hf];
      D[sh+i] = dSMA;
      if (SaveData) FileWrite(h,dSMA,SMA[i]-SMA[1],i);
    }
P.S. I see the detailed comments as a small revenge :)
 
to grasn.

That's it. I'm starting to master Matcad.
In terms of gratuitous help and an example, could you throw in the script that draws the pictures above.
 

Just got back from a business trip. So... what have we got here? Yeah... not much to go on, but okay, I'll just call it a day.

to Candid

I still don't know what my particular case is, but I assure you it's not important at all. But I haven't learned how to read other people's MQL code so easily. I should admit that I blush a little, I can hardly read mine, especially in the morning :o)

to vaa20003

I am always ready to help you. I attached the file and provided it with brief comments. The code is not the best from the viewpoint of optimization, but I didn't set such a task and besides I was in a hurry. I think it's an unpromising direction, not to mention that LR reaches its goals (or rather roughly outlined) more easily and accurately.

PS: Would need MathCAD 13.0/13.1 Step MA changes in PL function.

PSS: I hope eugenk's silence is not due to big problems and he will bring some fresh air



file here: http://grasn.narod.ru/test/PLANIMETRIA.xmcd It won't load.

 
Thank you. I'll learn :) (downloaded 14 already, but must be compatible!)
 
vaa20003:
Thank you. I'll learn :) (downloaded 14 already, but it should be compatible!)
here: http://twt.mpei.ac.ru/ochkov/Mathcad_14/index.html you can read about the differences between 13 and 14. I ended up sticking with 13.