Re: Bollinger Bands type indicators for MT4

1891
ixion700 wrote: Sun Mar 17, 2024 9:47 pm Hello dear @mrtools. This is Hodrick-Prescott channel indicator. To be honest I prefer it to BB. The upper and lower lines indeed work as support and resistance specially when they collide with horizontal S/R lines. That can provides us with better insight where the reversals are gonna happen. Could you give it a BTN, the option to display Label and where it should be placed please? I know ppl will ask for MTF soon:) so if possible give her the MTF function too. My deep gratitude in forward.

PS: I suggest all our Bollinger Band boys give it a shot, you may love it!
Working on it, will see what I can do, thanks for posting it.
These users thanked the author mrtools for the post:
ixion700


CodeRe: Bollinger Bands type indicators for MT4

1892
ixion700 wrote: Sun Mar 17, 2024 11:33 pm Yep. The default setting also works well.
Hodrick-Prescott Channels with double bands

Got this so far, will add the text and mtf later, just wanted you all to test to verify it's close to the other version. This version requires a .dll file (rar archive attached below) to be placed in your indicators/library folder, I made it from Mladen's version of Hodrick Prescott filter. Added 2 more sets of bands for Mr. Fish too.

PS: If you are new to .DLL files in MetaTrader, please read: Why do certain indicators require a .dll file?


These users thanked the author mrtools for the post (total 11):
TransparentTrader, RodrigoRT7, Mickey Abi, ixion700, josi, Krunal Gajjar, Jimmy, SijjiN, dmnik, scdihan, alexm

Re: Bollinger Bands type indicators for MT4

1894
mrtools wrote: Mon Mar 18, 2024 11:54 am Got this so far, will add the text and mtf later, just wanted you all to test to verify it's close to the other version. This version requires a dll file to be placed in your indicators/library folder, I made it from Mladen's version of Hodrick Prescott filter. Added 2 more sets of bands for Mr. Fish too.
If anyone downloaded it right after I posted I forgot to attach the dll zip file (attached it on the original post), like I said it goes in your indicator/library folder and make sure dll's are enabled.
These users thanked the author mrtools for the post (total 2):
RodrigoRT7, SijjiN

Re: Bollinger Bands type indicators for MT4

1895
mrtools wrote: Mon Mar 18, 2024 11:54 am Got this so far, will add the text and mtf later, just wanted you all to test to verify it's close to the other version. This version requires a dll file to be placed in your indicators/library folder, I made it from Mladen's version of Hodrick Prescott filter. Added 2 more sets of bands for Mr. Fish too.
Since the bands are Hodrick Prescott thought I would post this here too, it's a hp macd just remember it recalculates.
These users thanked the author mrtools for the post (total 5):
RodrigoRT7, vvFish, josi, Jimmy, SijjiN


Re: Bollinger Bands type indicators for MT4

1897
mrtools wrote: Mon Mar 18, 2024 11:54 am Got this so far, will add the text and mtf later, just wanted you all to test to verify it's close to the other version. This version requires a dll file to be placed in your indicators/library folder, I made it from Mladen's version of Hodrick Prescott filter. Added 2 more sets of bands for Mr. Fish too.
The second band moves close enough. According to AI in the first version some math is done to obtain the deviation value:

Code: Select all

"//--- Std calculation ---
disp=0.0;
for(i= 0; i<HPPeriodSlow; i++) disp+=(HP[i]-HPSlow[i])*(HP[i]-HPSlow[i]);
disp = disp/(HPPeriodSlow-1);
dev=MathSqrt(disp)*2.0; "
I don't know if its possible but can't we have two bands that one of them calculates the deviation the same way as first version and a second band which the deviation value is adjusted by the user(1,2,3)?
Think out of the box!

Re: Bollinger Bands type indicators for MT4

1898
ixion700 wrote: Mon Mar 18, 2024 5:51 pm The second band moves close enough. According to AI in the first version some math is done to obtain the deviation value:

Code: Select all

"//--- Std calculation ---
disp=0.0;
for(i= 0; i<HPPeriodSlow; i++) disp+=(HP[i]-HPSlow[i])*(HP[i]-HPSlow[i]);
disp = disp/(HPPeriodSlow-1);
dev=MathSqrt(disp)*2.0; "
I don't know if its possible but can't we have two bands that one of them calculates the deviation the same way as first version and a second band which the deviation value is adjusted by the user(1,2,3)?
This is how I did it:

Code: Select all

glo.disp = 0.0;
   for(int i=0; i<glo.sPer; i++)
      glo.disp+=(fhp[i]-shp[i])*(fhp[i]-shp[i]);
      glo.disp = glo.disp/(glo.sPer-1);
      glo.dev1  = sqrt(glo.disp)*inpDev1;
      glo.dev2  = sqrt(glo.disp)*inpDev2;
      glo.dev3  = sqrt(glo.disp)*inpDev3;
   for(int i=0; i<glo.sPer; i++)
   {
      upZ1[i] = shp[i] + glo.dev1;
      dnZ1[i] = shp[i] - glo.dev1;
      upZ2[i] = shp[i] + glo.dev2;
      dnZ2[i] = shp[i] - glo.dev2;
      upZ3[i] = shp[i] + glo.dev3;
      dnZ3[i] = shp[i] - glo.dev3;
   }
so instead of the

Code: Select all

dev=MathSqrt(disp)*2.0; 
I changed the 2 to a user-controlled deviation. So not sure what you want to do with that?
These users thanked the author mrtools for the post:
ixion700

Re: Bollinger Bands type indicators for MT4

1899
mrtools wrote: Tue Mar 19, 2024 1:07 am This is how I did it:

Code: Select all

glo.disp = 0.0;
   for(int i=0; i<glo.sPer; i++)
      glo.disp+=(fhp[i]-shp[i])*(fhp[i]-shp[i]);
      glo.disp = glo.disp/(glo.sPer-1);
      glo.dev1  = sqrt(glo.disp)*inpDev1;
      glo.dev2  = sqrt(glo.disp)*inpDev2;
      glo.dev3  = sqrt(glo.disp)*inpDev3;
   for(int i=0; i<glo.sPer; i++)
   {
      upZ1[i] = shp[i] + glo.dev1;
      dnZ1[i] = shp[i] - glo.dev1;
      upZ2[i] = shp[i] + glo.dev2;
      dnZ2[i] = shp[i] - glo.dev2;
      upZ3[i] = shp[i] + glo.dev3;
      dnZ3[i] = shp[i] - glo.dev3;
   }
so instead of the

Code: Select all

dev=MathSqrt(disp)*2.0; 
I changed the 2 to a user-controlled deviation. So not sure what you want to do with that?
Oh I see. Thought the little difference between the two versions when I set Dev=2 is because of different ways of dev calculation. Btw could you add median body price(CO/2) and average price(HLCO/4) please? Many thanks.
Think out of the box!

Re: Bollinger Bands type indicators for MT4

1900
I think it doesn't need a lot of work! I did some work with envelopes and they gave outstanding results. Can be used on any timeframe and gives good trend direction as well as entry points. It gives you an instant picture of how volatile a given market is at any given moment. I have included settings for both when market is ranging via the smaller envelopes settings as well as when the market is expanding and higher envelopes settings are needed to measure the targets.
These users thanked the author Mustafa for the post (total 3):
RodrigoRT7, mrtools, simon_n3z


Who is online

Users browsing this forum: Applebot [Crawler], binosp2, Facebook [Crawler], Intrest 1, PaperLi [Bot], SEMrush [Bot], Shamaninc, Shelwin51 and 50 guests