Bollinger color according to the trend ...

 

Hello,

I try to create an indicator that Bollinger bands and the moving average changes color depending on the trend.

I took the code already written "BB" but I have some problem writing the new code for several weeks.


Could someone help me pleaseI don't know why the indicator does not work as expected :-(

 

Thank you in advance, I started in MQL5.

Jean-Pierre 

Files:
BB_Color.mq5  9 kb
 
scalper06:

Hello,

I try to create an indicator that Bollinger bands and the moving average changes color depending on the trend.

I took the code already written "BB" but I have some problem writing the new code for several weeks.


Could someone help me pleaseI don't know why the indicator does not work as expected :-(

 

Thank you in advance, I started in MQL5.

Jean-Pierre 

Didn't look to your code, but did you look to ibbfill : https://www.mql5.com/en/code/98

Regards, 

iBBFill
iBBFill
  • votes: 13
  • 2010.04.12
  • Dmitry Fedoseev
  • www.mql5.com
The indicator plots the Bollinger Bands ®, filled with different colors depending on the trend direction.
 
scalper06:
och:

Didn't look to your code, but did you look to ibbfill : https://www.mql5.com/en/code/98

Regards, 

I found my error: www.mql5.com/en/articles/45

"If you have multiple Plots in your indicators, then the Buffer-Pattern of the indicators is arrangement in order of these Plots' Buffer-Pattern, the index of Buffer should be in ascending order when call SetIndexBuffer()."

 

A lot of sweat and time to learn ...

 

Thank you very much for your help.

 

Regards,

Jean-Pierre