Indicators with alerts/signal - page 530

 
avi1:
hi m8!like to give a try ,this indi ! thx

boyyyy What is so special about this indicator, is there something in this that i am missing out on, cuz mladen posted screenshot of this indicator repainting like crazy into giving signals every bar, hummmm hummmm

 

Help with adding email and arrows to the BBands of CCI

Help! Need Email Alerts and Arrows added to this indicator

Hi Everyone!

I have a BBands of CCI indicator.

I wish to get an email alert and arrows added when:

The Outer Bollinger Band of the CCI crosses a line (ie..150)

Example: if price is going up and top outer band of the BBand of CCI indicator crosses above the 150 line an alert is trigger and an email is sent. The opposite when the lower outer band of the BBand of CCI crosses below the -150 line. The email alert and arrow is produced.

I have included an picture and the indicator:

I had to remove the picture I post in the next post.

I also added the code:

//+------------------------------------------------------------------+

//| BBands of CCI.mq4 |

//| Bollinger Bands of CCI |

//| Copyright © 2011, PDSoftware Corp. |

//+------------------------------------------------------------------+

#property copyright "Copyright © 2011, PDSoftware Corp."

#property link

//----

#property indicator_separate_window

#property indicator_buffers 4

#property indicator_color1 MediumSeaGreen

#property indicator_color2 LightSeaGreen

#property indicator_color3 LightSeaGreen

#property indicator_color4 Red

//---- indicator parameters

extern int BandsPeriod=20;

extern int BandsShift=0;

extern double BandsDeviations=2.0;

extern int CCIPeriod = 14;

//---- buffers

double MovingBuffer[];

double UpperBuffer[];

double LowerBuffer[];

double CCIBuffer[];

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

//---- Set indicators

SetIndexStyle(0,DRAW_LINE);

SetIndexBuffer(0,MovingBuffer);

SetIndexStyle(1,DRAW_LINE);

SetIndexBuffer(1,UpperBuffer);

SetIndexStyle(2,DRAW_LINE);

SetIndexBuffer(2,LowerBuffer);

SetIndexStyle(3,DRAW_LINE);

SetIndexBuffer(3,CCIBuffer);

//----

SetIndexDrawBegin(0,BandsPeriod+BandsShift);

SetIndexDrawBegin(1,BandsPeriod+BandsShift);

SetIndexDrawBegin(2,BandsPeriod+BandsShift);

SetIndexDrawBegin(3,CCIPeriod);

//----

SetLevelValue(0,100);

SetLevelValue(1,-100);

//----

SetIndexLabel(0,"SMA");

SetIndexLabel(1,"Upper");

SetIndexLabel(2,"Lower");

SetIndexLabel(3,"CCI");

//---- name for DataWindow and indicator subwindow label

IndicatorShortName("BBands of CCI("+BandsPeriod+","+DoubleToStr(BandsDeviations,1)+","+CCIPeriod+")");

return(0);

}

//+------------------------------------------------------------------+

//| Bollinger Bands of CCI |

//+------------------------------------------------------------------+

int start()

{

int i,k,counted_bars=IndicatorCounted();

double deviation;

double sum,oldval,newres;

//----

if(Bars<=BandsPeriod) return(0);

//---- initial zero

if(counted_bars<1)

for(i=1;i<=BandsPeriod;i++)

{

MovingBuffer=EMPTY_VALUE;

UpperBuffer=EMPTY_VALUE;

LowerBuffer=EMPTY_VALUE;

}

//----

int limit=Bars-counted_bars;

if(counted_bars>0) limit++;

//Calculate CCI

for(i=0; i<limit; i++)

CCIBuffer= iCCI(NULL,0,CCIPeriod,PRICE_TYPICAL,i);

//Calculate MA of CCI x BBands

for(i=0; i<limit; i++)

MovingBuffer=iMAOnArray(CCIBuffer,Bars,BandsPeriod,0,MODE_SMA,i);

//----

i=Bars-BandsPeriod+1;

if(counted_bars>BandsPeriod-1) i=Bars-counted_bars-1;

//Calculate Upper & Lower Bands

while(i>=0)

{

sum=0.0;

k=i+BandsPeriod-1;

oldval=MovingBuffer;

while(k>=i)

{

newres=CCIBuffer[k]-oldval; //Refers to CCI !

sum+=newres*newres;

k--;

}

deviation=BandsDeviations*MathSqrt(sum/BandsPeriod);

UpperBuffer=oldval+deviation;

LowerBuffer=oldval-deviation;

i--;

}

//----

return(0);

}

//+------------------------------------------------------------------+

Files:
 

This is the picture with the example of the signal of the BBand of CCI in the above post.

Thanks in advance to all who can help.

 

Thank you for BolliToucher1 indi! It works great.

I was looking for this for a long time.

Is there a way to change bands diviation to 2.2 and 2.5?

I was trying it but it won't let me do this. I can change it only to 3.

 
vicky.a.:
Thank you for BolliToucher1 indi! It works great.

I was looking for this for a long time.

Is there a way to change bands diviation to 2.2 and 2.5?

I was trying it but it won't let me do this. I can change it only to 3.

I am glad it solved ur problem but if u load a normal bollinger band with 2.2 deviation and then load bollitoucher with 2 deviation, the result will be same. try loading both on top of eachother and pay close attention to the outer bands of bollitoucher and the signals its producing on 2 deviation over a normal 2.5 deviation bollinger bands. it just looks the same on here. but u test it urself and tell me if its different.

i dont quite understand ur strategy here cuz if u go in a buy deal on the break of upper band 6 most of the time the price will come right down to its middle line, and if u use it as a counter trend to go sell on upper break still it can go a long distance before it comes back, that bollinger alone is a bit shady to me lol. u see i am wearing shades to see its shady hehehe

 
Onpoint:
This is the picture with the example of the signal of the BBand of CCI in the above post.

Thanks in advance to all who can help.

Onpoint, maybe try this one out.

 
mrtools:
Onpoint, maybe try this one out.

Mr.Tools,

Thanks, Thanks, Thanks!

Yes this is just as I wanted. You even added some extra bells and whistles I noticed. (the ability to use different types of bands)

Cool!

Thanks Again!!

 

Hey guys i have an zigzag indicator with dotted lines can u pros please code an alert when the dot changes its color i mean ofcourse when a new colored dot appears then the alert should sound on the next candle.

Files:
 
lover:
Hey guys i have an zigzag indicator with dotted lines can u pros please code an alert when the dot changes its color i mean ofcourse when a new colored dot appears then the alert should sound on the next candle.

Zigzag will never appear on a current bar. That means that if you were to be alerted on a ZigZag it will always alert with some significant time delay

 
mladen:
Zigzag will never appear on a current bar. That means that if you were to be alerted on a ZigZag it will always alert with some significant time delay

hehehehe a cchange in color is instant and this is a dotted line not just zigzag its kinda like a resistance and support line it draws which should alert if opposite dot is form from red to blue or blue to red but it depends on zigzag i guess cuz it keeps changing if the candle hits it, i am not using it for the entry but for estimation purpose if u catch my drift hehehe, if u have something similiar which i bet u do cuz u own all the goodies hehehehe, i would be very happy to have it

Reason: