Adaptive lookback indicators - page 35

spotforex
79
spotforex  

Hi Mladen,

I've attempted to create a pa adaptive version of your FXCorrelator 3 USD. But I find that it acts rather sluggishly. (Perhaps it's the excuse I need to upgrade to a faster processor. ) Would you mind having a look at the code to determine if it can be improved upon. Would a bars back option reduce calculating times?

As always, thanks for your time and effort that you've put into my requests.

-spotforex

pa_fxcorrelator_3_usd.mq4

Mladen Rakic
169200
Mladen Rakic  

...

spotforex

There are 3 things that need to be considered regarding that indicator :

- it is processing 7 symbols at a time which is already a task that when done on a big number of bars not something that metatrader terminal "likes" to do

- second point has to do with how metatrader calculates averages (and any internal indicator it has) :

it allocates a new instance of indicator for each and every average that has any different parameter. For example, if you calculate 10 period simple average and then 11 period simple average metatrader duplicates all - the data, calculations, internal buffers it uses, all ... and when you force it to have different calculating lengths almost all the time (by using phase accumulation for adapting) it ends up creating zillion instances for averages

- if we would like to be 100% correct than phase accumulation for each of the 7 symbols should be calculated (because the way it is now, it applies the length of the current symbol, so it is adapting to current symbol, not the calculated symbol). Apart from not being mathematically correct, it is going to cause a different values when attached to different symbols which is not good. But that (calculating phase accumulation for each symbol) also would mean additional slowing down

Will try to find some reasonable solution, but having in mind points 2 and 3, I can not promise anything - at a first glance it simply looks like a Cray kind of computers problem and not a PC s that we use problem

spotforex:
Hi Mladen,

I've attempted to create a pa adaptive version of your FXCorrelator 3 USD. But I find that it acts rather sluggishly. (Perhaps it's the excuse I need to upgrade to a faster processor. ) Would you mind having a look at the code to determine if it can be improved upon. Would a bars back option reduce calculating times?

As always, thanks for your time and effort that you've put into my requests.

-spotforex

pa_fxcorrelator_3_usd.mq4
Mladen Rakic
169200
Mladen Rakic  

pa adaptive FX correlator ...

spotforex

This is much faster version of the phase accumulation adaptive version of FX correlator. Avoided the built in moving averages usage and it makes it acceptable as far as the speed is concerned (interesting that in this case avoiding what should be faster makes the indicator much faster(. It still uses the period calculation from a current chart (that part is yet to be resolved in some satisfactory way) but I think that in this form you can experiment with it much more easily

Mladen Rakic
169200
Mladen Rakic  

Adaptive rsx ...

This one is not using any of the adaptive methods that we usually use. It is using standard deviation and and an average of a standard deviation to calculate the coefficient that is then applied to the desired length of calculation. That way the length of calculation is constantly altered depending on the standard deviation and is also used as a "frame" for calculating period.

Here is a comparison of a "regular" 25 period rsx (lower) with an standard deviation adaptive 25 period rsx (upper) - as it is seen they are sometimes very different in values and I think that the adaptive is a bit more responsive to market conditions than the "regular" one:

Files:
dakiki
125
dakiki  

Hello Mladen,

Would you please be so kind and add divergencies to this last RSX indicator?

Thank you!

Daniel

dakiki
125
dakiki  

Hello Mladen,

Would it actually be possible to base the RSX adaptive on the attached RSX 2, and then also include divergenices?

Thank you very much!

Daniel

Mladen Rakic
169200
Mladen Rakic  

Adaptive lookback TMA ...

This one is a "pure" adaptive look-back indicator : was doing some experimenting and tested what happens with the triangular moving average when it gets adaptive (not a logical step since TMA calculation is based on bars not like EMA for example, but the result is surprisingly good considering and decided to post it) It is fast (even with default "speed" set to 1) and is smooth and that is what I like in it - the fact that it still keeps the smoothness

The "TMA" is a triangular moving average (the "real" triangular moving average not the centered one) so there is no repainting in it. Possible usage could be something like this : red is with speed a blue is with speed 1.2

Files:
spotforex
79
spotforex  

"Lwma" slope + ...

Hi Mladen,

Could you please add the following features to your Lwma slope:

- Phase accumulation

- ForSymbol

- Inverse option

- UniqueID

- Option to turn on/off the EMA signal line

- Short name for indicator.

As always, thank you for your time and expertise. They are very much appreciated.

-spotforex

lwma_slope_amp_alerts.mq4

Mladen Rakic
169200
Mladen Rakic  

...

spotforex

Here you go UniqueID is not added (it is necessary only when objects need to be created for some indicator). All the rest is done. If you set the EmaPeriod to less than or equal to 0, you will turn the EMA signal lines off (so it is done implicitly, not as an explicit option)

PS: I think I told this already but that is not actually LWMA slope (see the code and you will find a "calcWhatever" function) When the indicator was made this way I just kept it the same in values as the one that was posted, but be aware that it is a LWMA look-a-like slope not slope of a real LWMA

spotforex:
Hi Mladen,

Could you please add the following features to your Lwma slope:

- Phase accumulation

- ForSymbol

- Inverse option

- UniqueID

- Option to turn on/off the EMA signal line

- Short name for indicator.

As always, thank you for your time and expertise. They are very much appreciated.

-spotforex

lwma_slope_amp_alerts.mq4
Files:
spotforex
79
spotforex  

One more option...

Thanks Mladen!!!

I apologize for not including this feature in my previous request, but could you add the symbol suffix input option too. I tried loading the indicator but Metatrader stops responding. I plan on using the indicator with metals which has a _# suffix.

I tried doing it myself but to no avail.

Thanks again and have a restful weekend.

-spotforex