BB on MA

 

Hallo all coding expert friends,

Please help to code an Indi, based on BB and MA, (so, the indi consists of MA and BB)

BB calculation based on MA.

Thanks,

anton

 
anton1:
Hallo all coding expert friends,

Please help to code an Indi, based on BB and MA, (so, the indi consists of MA and BB)

BB calculation based on MA.

Thanks,

anton

Anton

The middle line of the Bollinger bands is a moving average already. Do you want that moving average to be applied to another moving average first and then used for middle line? It will make it smoother but it will also make it lag more

 

Hi mladen,

Yes, The mid line of BB is MA. I want this can be SMA, EMA or other.

Yes, you are right, the BB based on the MA (to be applied to another MA first).

Thanks and Regards,

anton

mladen:
Anton The middle line of the Bollinger bands is a moving average already. Do you want that moving average to be applied to another moving average first and then used for middle line? It will make it smoother but it will also make it lag more
 
anton1:
Hi mladen,

Yes, The mid line of BB is MA. I want this can be SMA, EMA or other.

Yes, you are right, the BB based on the MA (to be applied to another MA first).

Thanks and Regards,

anton

anton

Here is a Bollinger bands that uses ma of ma for basic calculation (deviation is calculated using that ma of ma too ) : bollinger_bands_of_ma_of_ma.mq4

PS: if you set the ma period to 1 you are going to get a "simple" Bollinger bands

 

Hi mladen,

Thanks for your help.

If I set MA period to "1", I get SIMPLE BB. How about the EMA, SMOOTHED and Light WEIGHTED MOVING AVERAGE (LWMA)?

Best Regards,

anton

mladen:
anton

Here is a Bollinger bands that uses ma of ma for basic calculation (deviation is calculated using that ma of ma too ) : bollinger_bands_of_ma_of_ma.mq4

PS: if you set the ma period to 1 you are going to get a "simple" Bollinger bands
 
anton1:
Hi mladen,

Thanks for your help.

If I set MA period to "1", I get SIMPLE BB. How about the EMA, SMOOTHED and Light WEIGHTED MOVING AVERAGE (LWMA)?

Best Regards,

anton

anton

Use the MaMethod parameter for that purpose

 

Hi mladen,

As I know, the '0' for SMA, '1' for EMA.

Why do you say: '1' for SMA? Please clarify.

Thanks and Regards,

anton

 
anton1:
Hi mladen,

As I know, the '0' for SMA, '1' for EMA.

Why do you say: '1' for SMA? Please clarify.

Thanks and Regards,

anton

anton

I did not say to set ma method. I said to set the ma periodto 1. Please read that post again. Ma period 1 means that it will be equal to the price regardless of the method. To change the ma method, use ma method parameter

 

Oooppsss.....

I am sorry, my mistake.

mladen,

Would you please to code the indi as follow:

1st, plot SMA20

2nd, plot BB20 Deviation 2 based on SMA20

Please see the attached picture.

Thank you and Regards,

anton

mladen:
anton I did not say to set ma method. I said to set the ma periodto 1. Please read that post again. Ma period 1 means that it will be equal to the price regardless of the method. To change the ma method, use ma method parameter
Files:
eurusdh1_2.png  47 kb
 
anton1:
Oooppsss.....

I am sorry, my mistake.

mladen,

Would you please to code the indi as follow:

1st, plot SMA20

2nd, plot BB20 Deviation 2 based on SMA20

Please see the attached picture.

Thank you and Regards,

anton

anton

here you go : bollinger_bands_of_ma_of_ma_1.01.mq4

 
anton1:
Oooppsss.....

I am sorry, my mistake.

mladen,

Would you please to code the indi as follow:

1st, plot SMA20

2nd, plot BB20 Deviation 2 based on SMA20

Please see the attached picture.

Thank you and Regards,

anton

How are you using it?