Re: MT5 Channel type indicators

21
From Mladen Rakic:

In TA some functions are, sometimes, overestimated and some are sometimes, underestimated
One of the usually underestimated is the the function used for calculating minimum or maximum of some data sample

* almost all functions that I saw that do that are some kind of a sorting functions offspring
* that is the case with the built in metatrader functions too
* and even though there are excellent sorting algorithms it is often forgotten that minimum and maximum calculation is not about sorting some data (at all)


So went on a search spree for better ways to calculate it. There are some solutions and attaching an original paper published by Daniel Lemire in 2008 (it is a public document downloaded from here : https://r-libre.teluq.ca/207/1/webmaximinalgo.pdf) . In it you can find a pseudo code for how he solved. But, for time series data in trading terminal(s), that algorithm might cause errors in some cases (partial data reload, just one example). Hence, I made what could be called rolling minimum-maximum that does not suffer from that kind of issues (and is even faster due to different way how memory is allocated and used).

One might wonder what it (the minimum-maximum) is used for. And frankly, probably in majority of indicators used there is some sort of it used. Attaching just one simplest way of looking for trend via simple minimum and maximum
_________________________
All the parameters as usual except for one :

* displaying the execution time or not
* it shows the execution time for the full set of historical bars only
* displaying the execution time for last tick only would not serve any purpose (since, for example, for 5000 bars execution time is usually 3-400 microseconds on an average CPU. ie: it takes less than a microsecond for just one bar on a last tick - it would display 0 most of the time)
* left it simply as a caprice to be able to check in details how the execution times are almost not varying at all when you start using long(er) periods (unlike when you do that with built in functions)

The rest is fairly simple to see what it does and how it can be used as any other trend calculating indicator
These users thanked the author mrtools for the post (total 7):
TransparentTrader, 太虚一毫, RodrigoRT7, thomdel, kvak, josi, Jimmy


Re: MT5 Channel type indicators

23
mrtools wrote: Tue Feb 06, 2024 1:17 pm From Mladen Rakic:

In TA some functions are, sometimes, overestimated and some are sometimes, underestimated
One of the usually underestimated is the the function used for calculating minimum or maximum of some data sample

* almost all functions that I saw that do that are some kind of a sorting functions offspring
* that is the case with the built in metatrader functions too
* and even though there are excellent sorting algorithms it is often forgotten that minimum and maximum calculation is not about sorting some data (at all)


So went on a search spree for better ways to calculate it. There are some solutions and attaching an original paper published by Daniel Lemire in 2008 (it is a public document downloaded from here : https://r-libre.teluq.ca/207/1/webmaximinalgo.pdf) . In it you can find a pseudo code for how he solved. But, for time series data in trading terminal(s), that algorithm might cause errors in some cases (partial data reload, just one example). Hence, I made what could be called rolling minimum-maximum that does not suffer from that kind of issues (and is even faster due to different way how memory is allocated and used).

One might wonder what it (the minimum-maximum) is used for. And frankly, probably in majority of indicators used there is some sort of it used. Attaching just one simplest way of looking for trend via simple minimum and maximum
_________________________
All the parameters as usual except for one :

* displaying the execution time or not
* it shows the execution time for the full set of historical bars only
* displaying the execution time for last tick only would not serve any purpose (since, for example, for 5000 bars execution time is usually 3-400 microseconds on an average CPU. ie: it takes less than a microsecond for just one bar on a last tick - it would display 0 most of the time)
* left it simply as a caprice to be able to check in details how the execution times are almost not varying at all when you start using long(er) periods (unlike when you do that with built in functions)

The rest is fairly simple to see what it does and how it can be used as any other trend calculating indicator
so it's just an cpu friendly optimized way to compute the maximum and minimum ?
Scalping the Century TimeFrame since 1999

Re: MT5 Channel type indicators

25
thomdel wrote: Sat Dec 27, 2025 2:58 am @ kvak
@ mrtools Sir


Reason for request :
These Indicators are among the best ones available on forum with their default params.

Respected kvak / Respected mrtools Sir,

Request you to Please Kindly have a look at these MT4 Indicators.

If you find useful for all users, then Request you to Please Kindly Convert them to MetaTrader 5 Indicators.

1) ! G Channel (mtf + alerts + arrows + candles + btn) : output like step line : Respected mrtools Sir
2) ! g channel filtered - (mtf + alerts + arrows + candles + btn) : output like MA : Respected mrtools Sir

3) g-channel (eAverages) : output like step line : respected kvak

Having All options will be very helpful in Inputs Menu :
1) Toggles : True False : for all the options will be very helpful. * ( Show Candles, Lines, Arrows : True False )
2) Candle color.
3) Line width, color.
4) Arrows Color, wingdings code, size, gap


Thanks for each & every upload.
Thanks for drop down menus, numerous options, mods.

Thanks for your Time, Efforts, Support, Generosity,
Hi, did this version for now.
These users thanked the author mrtools for the post:
Cagliostro


Re: MT5 Channel type indicators

26
mrtools wrote: Sat Dec 27, 2025 9:28 am Hi, did this version for now.


Respected mrtools Sir,

Thanks a Lot for this super fast conversion.

Please Note : It's working on New Metatrader 4 versions.

In older versions : It's showing in the Indicators Navigator window : but : does not attach to the chart ! ***
( attached pic )

FYI : kvak ver & all other indicators attach to chart

Tried restart and refresh of navigator window

Thanks again & again.
Thanks for your great generosity, support.
Thanks.

Re: MT5 Channel type indicators

27
thomdel wrote: Sat Dec 27, 2025 9:50 am Respected mrtools Sir,

Thanks a Lot for this super fast conversion.

Please Note : It's working on New Metatrader 4 versions.

In older versions : It's showing in the Indicators Navigator window : but : does not attach to the chart ! ***
( attached pic )

FYI : kvak ver & all other indicators attach to chart

Tried restart and refresh of navigator window

Thanks again & again.
Thanks for your great generosity, support.
Thanks.
Don't know guess they changed something in the newer updates, because my mt5 probably updates at least 2 or 3 times a week, so don't really know how to get it to work on the older versions, sorry.

Re: MT5 Channel type indicators

28
mrtools wrote: Sat Dec 27, 2025 10:08 am Don't know guess they changed something in the newer updates, because my mt5 probably updates at least 2 or 3 times a week, so don't really know how to get it to work on the older versions, sorry.


Respected mrtools Sir,

All old & new indicators : list in navigators window and attach to chart in all older MT5 versions.

I tried kvak ver just few mins back in OLDER MT5 version.

But your version list in the navigator window but not able to attach !
This happened first time.

Can you Kindly Please Try Compiling your version OR any code line in your version that is preventing it to apply on chart.


Thanks. Thanks. Thanks.

Re: MT5 Channel type indicators

29
thomdel wrote: Sat Dec 27, 2025 10:14 am Respected mrtools Sir,

All old & new indicators : list in navigators window and attach to chart in all older MT5 versions.

I tried kvak ver just few mins back in OLDER MT5 version.

But your version list in the navigator window but not able to attach !
This happened first time.

Can you Kindly Please Try Compiling your version OR any code line in your version that is preventing it to apply on chart.


Thanks. Thanks. Thanks.
Recompiled it.
These users thanked the author mrtools for the post:
kvak