Hope you had a good weekend. Could you add on to what is missing in the file i tried to modify below? Trying to code a "Median Absolute Deviation from the Median (instead of calculation from the mean)", basically a moving median followed by a median absolute deviation (MAD-M). It's particularly useful for contaminated distributions & for the kind of probability distribution function we have in forex time series.

I could only manage to get as far as simplifying igorad's "moving median" as much as i could, then got totally lost looking at the absolute deviations inside "Deviations" which you coded & so correspondingly didnt do the additional final median part too. Been trying to do this for 10 hours straight after being hopeful that looking at the MQL tutorials for beginners should be sufficient but it turns out to the contrary= hhahaaaaaa= ............ (feels like im drifting in the middle of the desert by now).

Thanks alot Mladen. & sorry to trouble you again. Would gladly give you a million kisses, but i doubt you would want it LOL = hehehehe

Hope you had a good weekend. Could you add on to what is missing in the file i tried to modify below? Trying to code a "Median Absolute Deviation from the Median (instead of calculation from the mean)", basically a moving median followed by a median absolute deviation (MAD-M). It's particularly useful for contaminated distributions & for the kind of probability distribution function we have in forex time series.

I could only manage to get as far as simplifying igorad's "moving median" as much as i could, then got totally lost looking at the absolute deviations inside "Deviations" which you coded & so correspondingly didnt do the additional final median part too. Been trying to do this for 10 hours straight after being hopeful that looking at the MQL tutorials for beginners should be sufficient but it turns out to the contrary= hhahaaaaaa= ............ (feels like im drifting in the middle of the desert by now).

Thanks alot Mladen. & sorry to trouble you again. Would gladly give you a million kisses, but i doubt you would want it LOL = hehehehe

Yours sincerely,

Wintersky

Wintersky

You can not do that with igorads functions (they have to be written differently in order to be multi instance functions which is what you need in this case). Here is one median, and median absolute deviation that are using multi-instance capable median function for calculation.

Here is an example of that median (so that you can compare it to some other medians), a median absolute deviation and at the bottom a standard deviation and how they compare to each other :

can you please explain the concept behind xo indicator.

and is there any way to add filter on it to reduce the false signal as shown in the picture.

thanks a lot

Hi human18,

XO has been around for afew decades already, but known as Point & Figure Charting. Basically, it has a box size which you set as the price range. More stability can be done by setting to higher lengths (relatively speaking). If price doesnt move out of a certain range, the XO will display the same level throughout for as long as price doesnt break the box price range limit.

An alternative format of this XO is "CFB XO", adaptive according to jurik's Composite Fractal Behavior available in the Advanced Elite Section. Another version similar to XO is Renko. Hope this helps you.

Thanks alot for that MAD! It works really interesting when i put it as an icustom function in indicators which uses the SD. & since you did the median already, i thought it would be easy for me to do the same by adding on to calculate the Median True Range (mtr) within the same code, but it turns out that im pushing the frontier too far with my beginner level, sadly, so if you dont mind, could you help to make it right?

Thanks thanks! (visualizes mladen coming after me with a knife looking at the crappy code i inserted, which literally cant be called coding even).

Really really sorry Mladen for troubling you again

Thanks alot for that MAD! It works really interesting when i put it as an icustom function in indicators which uses the SD. & since you did the median already, i thought it would be easy for me to do the same by adding on to calculate the Median True Range (mtr) within the same code, but it turns out that im pushing the frontier too far with my beginner level, sadly, so if you dont mind, could you help to make it right?

Thanks thanks! (visualizes mladen coming after me with a knife looking at the crappy code i inserted, which literally cant be called coding even).

Really really sorry Mladen for troubling you again

Words cannot express my gratitude for your help. Beers cannot transmit themselves through the internet, but a picture says a thousand words. There's nothing much that i can do for you, so i've sent you a PM to show you a preliminary look at the way i've applied it to show my appreciation, as i'm still investigating better ways to apply it more effectively.

While there's no Holy Grail and there's nothing that's really revolutionary nor sophisticated in this whole thing, but there's better stability for this stuff that you've coded as compared to the usual formula & the results are abit interesting as i must say, which in a way shows better statistical efficiency as the literature says indeed

I have archieved some interesting results with some indicators by replacing PRICE (SMA 1 ) with optimized PERIODS OF EITHER THE EMA OR LWMA in the formula of such indicators.

However, my research has been limited to just using the default MAs in MT4 ( SMA,EMA,SMMA,and LWMA ) because i dont know how to input a different MA outside the default 4 MAs.

Can you kindly show me HOW to do this ?

And secondly, please assist to USE NEMA NRP MA in place of the LWMA or EMA i have earlier used to replace PRICE ( SMA 1 ) in these three indicators.

I have archieved some interesting results with some indicators by replacing PRICE (SMA 1 ) with optimized PERIODS OF EITHER THE EMA OR LWMA in the formula of such indicators.

However, my research has been limited to just using the default MAs in MT4 ( SMA,EMA,SMMA,and LWMA ) because i dont know how to input a different MA outside the default 4 MAs.

Can you kindly show me HOW to do this ?

And secondly, please assist to USE NEMA NRP MA in place of the LWMA or EMA i have earlier used to replace PRICE ( SMA 1 ) in these three indicators.

THANK YOU SO MUCH FOR YOUR INVALUABLE SREVICES.

winner246

Here is a SAR that uses those 18 possible types of averages (as an example how it can be done. The averages (depending on MaMethod) are the usual ones :

hello mladen

First, I have to thank you for previous post.

actually, I was so confused with my trading system for some days, apologizing my horrible post.

At this time, it's about renko bar.

there are few "the mean renko bar" for only ninjatrader on website, not MT4. - Mean Renko Bars | Best Day Trading Software | Ninja Trader

2 files attached below are normal renko expert - another is .ex4 that I use and I just refer to it.

I'm begging your advice.

Files:Median Absolute Deviation From The Median

Hi Mladen,

Hope you had a good weekend. Could you add on to what is missing in the file i tried to modify below? Trying to code a "Median Absolute Deviation from the Median (instead of calculation from the mean)", basically a moving median followed by a median absolute deviation (MAD-M). It's particularly useful for contaminated distributions & for the kind of probability distribution function we have in forex time series.

Median absolute deviation - Wikipedia, the free encyclopedia

I could only manage to get as far as simplifying igorad's "moving median" as much as i could, then got totally lost looking at the absolute deviations inside "Deviations" which you coded & so correspondingly didnt do the additional final median part too. Been trying to do this for 10 hours straight after being hopeful that looking at the MQL tutorials for beginners should be sufficient but it turns out to the contrary= hhahaaaaaa= ............ (feels like im drifting in the middle of the desert by now).

Thanks alot Mladen. & sorry to trouble you again. Would gladly give you a million kisses, but i doubt you would want it LOL = hehehehe

Yours sincerely,

Wintersky

Files:Median Absolute Deviation

wintersky111:Hi Mladen,

Hope you had a good weekend. Could you add on to what is missing in the file i tried to modify below? Trying to code a "Median Absolute Deviation from the Median (instead of calculation from the mean)", basically a moving median followed by a median absolute deviation (MAD-M). It's particularly useful for contaminated distributions & for the kind of probability distribution function we have in forex time series.

Median absolute deviation - Wikipedia, the free encyclopedia

I could only manage to get as far as simplifying igorad's "moving median" as much as i could, then got totally lost looking at the absolute deviations inside "Deviations" which you coded & so correspondingly didnt do the additional final median part too. Been trying to do this for 10 hours straight after being hopeful that looking at the MQL tutorials for beginners should be sufficient but it turns out to the contrary= hhahaaaaaa= ............ (feels like im drifting in the middle of the desert by now).

Thanks alot Mladen. & sorry to trouble you again. Would gladly give you a million kisses, but i doubt you would want it LOL = hehehehe

Yours sincerely,

WinterskyWintersky

You can not do that with igorads functions (they have to be written differently in order to be multi instance functions which is what you need in this case). Here is one median, and median absolute deviation that are using multi-instance capable median function for calculation.

Here is an example of that median (so that you can compare it to some other medians), a median absolute deviation and at the bottom a standard deviation and how they compare to each other :

Files:Hi Mladen,

can you please explain the concept behind xo indicator.

and is there any way to add filter on it to reduce the false signal as shown in the picture.

thanks a lot

Files:human18:Hi Mladen,

can you please explain the concept behind xo indicator.

and is there any way to add filter on it to reduce the false signal as shown in the picture.

thanks a lotHi human18,

XO has been around for afew decades already, but known as Point & Figure Charting. Basically, it has a box size which you set as the price range. More stability can be done by setting to higher lengths (relatively speaking). If price doesnt move out of a certain range, the XO will display the same level throughout for as long as price doesnt break the box price range limit.

An alternative format of this XO is "CFB XO", adaptive according to jurik's Composite Fractal Behavior available in the Advanced Elite Section. Another version similar to XO is Renko. Hope this helps you.

Yours sincerely,

Wintersky

Median True Range

Mladen,

Thanks alot for that MAD! It works really interesting when i put it as an icustom function in indicators which uses the SD. & since you did the median already, i thought it would be easy for me to do the same by adding on to calculate the Median True Range (mtr) within the same code, but it turns out that im pushing the frontier too far with my beginner level, sadly, so if you dont mind, could you help to make it right?

Thanks thanks! (visualizes mladen coming after me with a knife looking at the crappy code i inserted, which literally cant be called coding even).

Really really sorry Mladen for troubling you again

Yours sincerely,

Wintersky

Files:wintersky111:Mladen,

Thanks alot for that MAD! It works really interesting when i put it as an icustom function in indicators which uses the SD. & since you did the median already, i thought it would be easy for me to do the same by adding on to calculate the Median True Range (mtr) within the same code, but it turns out that im pushing the frontier too far with my beginner level, sadly, so if you dont mind, could you help to make it right?

Thanks thanks! (visualizes mladen coming after me with a knife looking at the crappy code i inserted, which literally cant be called coding even).

Really really sorry Mladen for troubling you again

Yours sincerely,

WinterskyWintersky

Here you go

Files:Mladen,

Words cannot express my gratitude for your help. Beers cannot transmit themselves through the internet, but a picture says a thousand words. There's nothing much that i can do for you, so i've sent you a PM to show you a preliminary look at the way i've applied it to show my appreciation, as i'm still investigating better ways to apply it more effectively.

While there's no Holy Grail and there's nothing that's really revolutionary nor sophisticated in this whole thing, but there's better stability for this stuff that you've coded as compared to the usual formula & the results are abit interesting as i must say, which in a way shows better statistical efficiency as the literature says indeed

Thanks for everything.

Yours sincerely,

Wintersky

Nema nrp in place of price ( sma 1 )

HELLO MLADEN,

I have archieved some interesting results with some indicators by replacing PRICE (SMA 1 ) with optimized PERIODS OF EITHER THE EMA OR LWMA in the formula of such indicators.

However, my research has been limited to just using the default MAs in MT4 ( SMA,EMA,SMMA,and LWMA ) because i dont know how to input a different MA outside the default 4 MAs.

Can you kindly show me HOW to do this ?

And secondly, please assist to USE NEMA NRP MA in place of the LWMA or EMA i have earlier used to replace PRICE ( SMA 1 ) in these three indicators.

THANK YOU SO MUCH FOR YOUR INVALUABLE SREVICES.

Files:winner246:HELLO MLADEN,

I have archieved some interesting results with some indicators by replacing PRICE (SMA 1 ) with optimized PERIODS OF EITHER THE EMA OR LWMA in the formula of such indicators.

However, my research has been limited to just using the default MAs in MT4 ( SMA,EMA,SMMA,and LWMA ) because i dont know how to input a different MA outside the default 4 MAs.

Can you kindly show me HOW to do this ?

And secondly, please assist to USE NEMA NRP MA in place of the LWMA or EMA i have earlier used to replace PRICE ( SMA 1 ) in these three indicators.

THANK YOU SO MUCH FOR YOUR INVALUABLE SREVICES.winner246

Here is a SAR that uses those 18 possible types of averages (as an example how it can be done. The averages (depending on MaMethod) are the usual ones :Files: