endymion
69
endymion  

Alert to XO!!!

Would one of you very nice programmers add an alert to this wonderful indicator for me? Thanks in advance!!

I don't have the actual MQL4 source code for this one, but found the code online. I'm attaching only the ex4 here.

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

//| XO.mq4 |

//| Original Author SHARIPOV AINUR |

//| Conversion to MT4 and modification only adoleh2000 |

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

#property copyright "Copyright � 2005, MetaQuotes Software Corp."

#property link "http://www.metaquotes.net"

#property indicator_separate_window

#property indicator_buffers 2

#property indicator_color1 Lime //XO up

#property indicator_color2 Red //XO down

extern double KirPER=10;

double cb,valuel,valueh,CurrentBar;

double Kir ,Hi, Lo, KirUp, KirDn,mode,cnt,cnt1,cur,kr,no;

double ExtMapBuffer1[]; // XO up

double ExtMapBuffer2[]; // Xo down

int loopbegin;

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

//| Custom indicator initialization function |

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

int init()

{

IndicatorBuffers(2);

//---- drawing settings

SetIndexBuffer(0,ExtMapBuffer1);//bbMacd line

SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,2);

SetIndexBuffer(1,ExtMapBuffer2);//Upperband line

SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,2);

IndicatorShortName("XO ("+KirPER+"), "+valueh+","+valuel);

SetIndexLabel(0,"XO Up");

SetIndexLabel(1,"XO Down");

//---- indicators

//----

return(0);

}

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

//| Custom indicator iteration function |

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

int start()

{

int limit;

int counted_bars=IndicatorCounted();

//---- check for possible errors

if(counted_bars<0) return(-1);

//---- last counted bar will be recounted

if(counted_bars>0) counted_bars--;

loopbegin = Bars-1;

for(int i = loopbegin; i >= 0; i--)

{

if (Kir<1)

{

Hi=Close;

Lo=Close;

Kir=1;

}

cur=(Close);

if (cur > (Hi+KirPER * Point))

{

Kir=Kir+1;

Hi=cur;

Lo=cur-KirPER*Point;

KirUp=1;

KirDn=0;

kr=kr+1;

no=0;

}

if (cur < (Lo-KirPER*Point))

{

Lo=cur;

Hi=cur+KirPER*Point;

KirUp=0;

KirDn=1;

Kir=Kir+1;

no=no+1;

kr=0;

}

valueh=kr;

ExtMapBuffer1=valueh;//XO up

if (valueh < 0)

{

ExtMapBuffer1 = 0;

}

if (valueh > 0)

{

ExtMapBuffer1 = 1;

}

valuel=0-no;

ExtMapBuffer2=valuel;// XO down

if (valuel > 0)

{

ExtMapBuffer2 = 0;

}

if (valuel < 0)

{

ExtMapBuffer2 = -1;

}

}

//----

return(0);

}

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

Files:
xo.ex4 3 kb
William Snyder
9549
William Snyder  
endymion:
Would one of you very nice programmers add an alert to this wonderful indicator for me? Thanks in advance!!

I don't have the actual MQL4 source code for this one, but found the code online. I'm attaching only the ex4 here.

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

//| XO.mq4 |

//| Original Author SHARIPOV AINUR |

//| Conversion to MT4 and modification only adoleh2000 |

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

#property copyright "Copyright � 2005, MetaQuotes Software Corp."

#property link "http://www.metaquotes.net"

#property indicator_separate_window

#property indicator_buffers 2

#property indicator_color1 Lime //XO up

#property indicator_color2 Red //XO down

extern double KirPER=10;

double cb,valuel,valueh,CurrentBar;

double Kir ,Hi, Lo, KirUp, KirDn,mode,cnt,cnt1,cur,kr,no;

double ExtMapBuffer1[]; // XO up

double ExtMapBuffer2[]; // Xo down

int loopbegin;

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

//| Custom indicator initialization function |

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

int init()

{

IndicatorBuffers(2);

//---- drawing settings

SetIndexBuffer(0,ExtMapBuffer1);//bbMacd line

SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,2);

SetIndexBuffer(1,ExtMapBuffer2);//Upperband line

SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,2);

IndicatorShortName("XO ("+KirPER+"), "+valueh+","+valuel);

SetIndexLabel(0,"XO Up");

SetIndexLabel(1,"XO Down");

//---- indicators

//----

return(0);

}

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

//| Custom indicator iteration function |

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

int start()

{

int limit;

int counted_bars=IndicatorCounted();

//---- check for possible errors

if(counted_bars<0) return(-1);

//---- last counted bar will be recounted

if(counted_bars>0) counted_bars--;

loopbegin = Bars-1;

for(int i = loopbegin; i >= 0; i--)

{

if (Kir<1)

{

Hi=Close;

Lo=Close;

Kir=1;

}

cur=(Close);

if (cur > (Hi+KirPER * Point))

{

Kir=Kir+1;

Hi=cur;

Lo=cur-KirPER*Point;

KirUp=1;

KirDn=0;

kr=kr+1;

no=0;

}

if (cur < (Lo-KirPER*Point))

{

Lo=cur;

Hi=cur+KirPER*Point;

KirUp=0;

KirDn=1;

Kir=Kir+1;

no=no+1;

kr=0;

}

valueh=kr;

ExtMapBuffer1=valueh;//XO up

if (valueh < 0)

{

ExtMapBuffer1 = 0;

}

if (valueh > 0)

{

ExtMapBuffer1 = 1;

}

valuel=0-no;

ExtMapBuffer2=valuel;// XO down

if (valuel > 0)

{

ExtMapBuffer2 = 0;

}

if (valuel < 0)

{

ExtMapBuffer2 = -1;

}

}

//----

return(0);

}

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

Hi Endymion,

Think i posted this in this thread but couldn't find it, anyway here you go.

Files:
b12
4
b12  
b12:
Hi, can anyone help me and anyone who are also in need for this feature : The indicator below have an message alert & email alert whenever price breach the horizontal line. But I want the signal to only be trigger when price close equal or beyond the horizontal line. If such indicator had already exist somewhere with alert and all or even with drag and drop feature then please do direct it me there because I had search high and low but still could not find it. Thank you .

Hi, anyone can help me to change the indicator from being trigger whenever price touch horizontal level to trigger only when price close equal or beyond the horizontal level, or perhaps I am in the wrong forum section for requesting for help to change the indicator criterion when the indicator already have alert feature? Anyway, thank you in advance.

William Snyder
9549
William Snyder  
Joradan:
Hi All,

I'm Jordan and new to this forum. I would like to take this opprotunity to thank the architect of this website and all those who participate in sharing..

Can anyone please add an Alert to this indicator?

Hi Jordan,

Looks like there already an alert installed in this indicator.

Joradan
6
Joradan  
mrtools:
Hi Jordan, Looks like there already an alert installed in this indicator.

Hi Mrtools,

You are correct but there's no sound alert though...

Here's the original indicator which I wanted to post.. My bad

Can you please add a sound alert to this indicator?

divergence.mq4

Files:
vrashtekar
140
vrashtekar  

Hi,

Can anyone please add an Alerts and signals when both indicator in same window and crosses each other?

it will be powerful trading tool

William Snyder
9549
William Snyder  
Joradan:
Hi Mrtools,

You are correct but there's no sound alert though...

Here's the original indicator which I wanted to post.. My bad

Can you please add a sound alert to this indicator?

divergence.mq4

Hi Jordan,

Sorry about that automatically figured when said sound alerts there would be sound ,anyway here a version with sound, the Divergence did the alerts, should go off when the colored bar happens.

William Snyder
9549
William Snyder  
alpha24:
Hi,

Can anyone please add an Alerts and signals when both indicator in same window and crosses each other?

it will be powerful trading tool

Hi Alpha24,

They are both together now actually they are a kind of wpr, had to do the second one a little different to get some distance between them so anyway this is a version of the 2 together with T3 smoothing and alerts.

michaelB
148
michaelB  

mrtools - Percent R PCRx2 smoothed

regarding your chart in post 3896-

are the red and blue candles part of the Percent R PCRx2 smoothed indicator?

I downloaded the indicator to the same AUDUSD H1 chart, but did not see any colored candles.

Thank you.

[the market is closed right now, would that make any difference]

William Snyder
9549
William Snyder  
michaelB:
regarding your chart in post 3896-

are the red and blue candles part of the Percent R PCRx2 smoothed indicator?

I downloaded the indicator to the same AUDUSD H1 chart, but did not see any colored candles.

Thank you.

[the market is closed right now, would that make any difference]

Hi MichaelB,

No those candles are from the divergence alerts posted a couple posts up.