BB_macd Indicator in Expert Advisor

shashi6666

Trader
Jun 29, 2017
10
0
6
42
hi,
i called the bb_macd indicator into my advisor using iCustom . how do i get alert when there is change in the color. from blue to red or red to blue.

thanks in advance
 

hayseed

Master Trader
Jul 27, 2010
1,147
273
149
usa
hi,
i called the bb_macd indicator into my advisor using iCustom . how do i get alert when there is change in the color. from blue to red or red to blue.

thanks in advance
//-----

hey shashi..... we would need to see your bb macd indicators mq4 file to say for sure...... otherwise we are just guessing.....h
 

shashi6666

Trader
Jun 29, 2017
10
0
6
42
//-----

hey shashi..... we would need to see your bb macd indicators mq4 file to say for sure...... otherwise we are just guessing.....h

double bbmacdcolorchange()
{



double bbu=iCustom(NULL,5,"bb_macd_1",fastlen,slowlen,length,barscount,stdv,4,shift);
double bbua=iCustom(NULL,5,"bb_macd_1",fastlen,slowlen,length,barscount,stdv,4,shift+1);
double bbub=iCustom(NULL,5,"bb_macd_1",fastlen,slowlen,length,barscount,stdv,4,shift+2);/*
double bbd=iCustom(NULL,0,"BB_MACD_v1.01",fastlen,slowlen,length,barscount,stdv,1,shift);
double bbda=iCustom(NULL,0,"BB_MACD_v1.01",fastlen,slowlen,length,barscount,stdv,1,shift+1);*/

double bbh=iCustom(NULL,5,"bb_macd_1",fastlen,slowlen,length,barscount,stdv,2,shift);
double bbl=iCustom(NULL,5,"bb_macd_1",fastlen,slowlen,length,barscount,stdv,3,shift);

double bars_high=Highest(NULL,5,MODE_HIGH,floate,1);
double bars_low=Lowest(NULL,5,MODE_LOW,floate,1);

int signal=0;
if(bbu>bbua && bbua<bbub
&& (strengthfilter==false || (strengthfilter && bbh-bbl>strength*UsePoint))
&& (floatfilter==false || (floatfilter && bars_low<bars_high)))
signal=1;
if(bbu<bbua && bbua>bbub
&& (strengthfilter==false || (strengthfilter && bbh-bbl>strength*UsePoint))
&& (floatfilter==false || (floatfilter && bars_low>bars_high)))
signal=2;

return(signal);
}

these are my code