Mogalef Bands

 

I've been working on this for a while, am new to MT4 indicator programming & not sure its 100% right yet, but it seems to work pretty well. Any & all feedback/suggestions are welcome.

Btw I see there's a Mogalef Bands indicator in the Elite section. I'm not an Elite subscriber, and I don't have that indicator - this is my own creation based off the logic in the Prorealtime Mogalef.

mogalefbands.zip

Files:
 

slipshod

Nice work

But ... the but now.

There are a couple of corrections in the code that need to be done in order to make it work as it should. Let me explain (in order not to be misunderstood).

In metatrader a form like means next element of a buffer not the previous element, so in that case you were comparing current with future values. As far as I am aware of, the original Mogalef indicator dos not do that that way (it in fact would make it a repainting indicator, in the same class like the infamous "Solar wind") So, made some changes in the code (just a few) in order to make it work "in the right direction". Now it gives essentially same values as the one from elite section with same inputs, except for linear regression value differences (not big ones, but they do exist - I did not check that part of code for the reason of differences, but, frankly, the difference is a small one so I did not mean it is so important)

Keep up the good work

regards

Mladen

slipshod:
I've been working on this for a while, am new to MT4 indicator programming & not sure its 100% right yet, but it seems to work pretty well. Any & all feedback/suggestions are welcome.

Btw I see there's a Mogalef Bands indicator in the Elite section. I'm not an Elite subscriber, and I don't have that indicator - this is my own creation based off the logic in the Prorealtime Mogalef.

mogalefbands.zip
Files:
 

Hi mladen, thanks for your suggestions & corrected code I hadn't seen it repainting when watching a chart update, but if I closed and re-opened the chart I was seeing changes here & there, and couldn't figure out why.

OTOH version 2 isn't quite correct either.

Compare the 2 pictures below, taken a few minutes apart. The bands drawn for the last 3 or so bars are pretty wild & very misleading. As you can see, the bands are continuing unchanged with the price contained within, but for some reason the very ends of the band lines are predicting all kinds of changes that don't end up happening.

Any ideas on what could be causing this?

Files:
mog1.png  12 kb
mog2.png  11 kb
 

I think this corrects the above problem

mogalefbands3.zip

Files:
 

You are right. I did not check everything

Here is one more change : there is no need at all to check if the index value is within some range, and in the version 2 there was a if (index>1) checking which was wrong once when it calculates "from left to right") So, now it should work as it is supposed to

regards

Mladen

Files:
 
 

Hi Simba, that "feature" was actually a bug in the implementation that I was trying to fix - Mogalefs shouldn't behave that way.

I was about to say that my version 3 had problems as well, but Mladen beat me to it and better still his version 4 above is perfect Many thanks Mladen, this indicator was seriously driving me nuts, great to see it working well now.

 
slipshod:
Hi Simba, that "feature" was actually a bug in the implementation that I was trying to fix - Mogalefs shouldn't behave that way. I was about to say that my version 3 had problems as well, but Mladen beat me to it and better still his version 4 above is perfect Many thanks Mladen, this indicator was seriously driving me nuts, great to see it working well now.

Thanks slipshod,I knew it was a bug,I just wanted to explore its unintended effects ...I will check on a M1 chart and see if there is any correlation between bug directionality and band directionality.There is something to be learnt by studying the strange effects of erroneous code .

Regards

S

 

xxx

That indicator (the "NN" whatever) has nothing to do with ANN. It uses qpwrs extrapolation routines that can change (extrapolation results) and are changing on every tick (extrapolations on short sample periods do that all the time), and leaves (accumulates) regions where extrapolation results were more frequent. I wonder what would qpwr say to his code used that way (without even mentioning who wrote at least 90% of that code)

qpwrs extrapolator that was used for that "NN" can be downloaded for free from here : Extrapolator - MQL4 Code Base (see the date : it was posted there almost 3 years ago)

 

So nice to have this working now. Just thought I'd post a pic or two illustrating how I interpret them & use them in trading (settings are 20/25)...

and with the 5 minute chart, same settings ...

Files:
mog4.png  45 kb
mog5.png  46 kb
 

Mogalef-Bands look good in this week market condition

it look good too to combine with this indicator

thanks mladen

I did notice that it seem to blown away to the right

for the same ranging market

there is a good thing -- about the NN--script indicator === as only when we click it, it runs; i.e. we could check the accuracy against its prediction half day later (it will not continue to run , like other indicator)

==========

the Mogalef-Bands sample is for 1m 5m in the next page -- those are risky TF

does Mogalef-Bands work well for 30M H1 ??

if so, may I have theMogalef-Bands .ex4 version to download pls

Reason: