Indicators with alerts/signal - page 336

doody
9
doody  

a "take profit & stop loss" expert that needs alert

hey guys

i got this EA that will help u set your stop loss and take profit and it will set it for u automatically once u open any trade...

can any1 plz help me by adding an alert that d cum up when the order closes and show

1) the pair &

2) wether its profit or loss...

thanx alot n happy trading day

Files:
rizkyd
59
rizkyd  

if (OrderOpenPrice()>3)

{

ordersell = OP_SELL;

}

else {

orderbuy = OP_BUY;

}

this you mean ??

but where the logic to open position ??

a1arunner
13
a1arunner  

Need Help adding email to indicator alert

Can anyone help me add SendMail to this indicator? It alerts just fine but I cannot get it to send an email. My programming skills are very limited. Thank you for any help you can offer!

Mike

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

//| Fine Fractals.mq4 |

//| Copyright © 2009 Äåíèñ Îðëîâ |

//| Денис Орлов - Электронная музыка |

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

#property copyright "Copyright © 2009 Äåíèñ Îðëîâ"

#property link "http://denis-or-love.narod.ru"

#property indicator_chart_window

#property indicator_buffers 2

#property indicator_color1 Red

#property indicator_color2 Green

//---- buffers

double ExtMapBuffer1[];

double ExtMapBuffer2[];

extern bool Fine=True;

extern bool FlatShift=True;

extern bool NewFAlert=False;

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

//| iCustom indicator initialization function |

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

int init()

{

//---- indicators

SetIndexStyle(0, DRAW_ARROW);

SetIndexArrow(0,164);

SetIndexBuffer(0, ExtMapBuffer1);

SetIndexEmptyValue(0, 0.0);

SetIndexStyle(1, DRAW_ARROW);

SetIndexArrow(1, 164);

SetIndexBuffer(1, ExtMapBuffer2);

SetIndexEmptyValue(1, 0.0);

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

IndicatorShortName("Fine Fractals");

SetIndexLabel(0, "iFractalsUp");

SetIndexLabel(1, "iFractalsDn");

//----

return(0);

}

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

//| Custom indicator deinitialization function |

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

int deinit()

{

//----

return(0);

}

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

//| Custom indicator iteration function |

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

int start()

{

int counted_bars = IndicatorCounted();

//----

int limit;

//---- ïîñëåäíèé ïîñ÷èòàííûé áàð áóäåò ïåðåñ÷èòàí

if(counted_bars > 0)

counted_bars--;

limit = Bars - counted_bars;

//---- îñíîâíîé öèêë

for(int i = 2; i < limit; i++)

{

double

HP1=High,HP2=High,HP3=High,HPi=High,

LP1=Low,LP2=Low,LP3=Low, LPi=Low,

res=iFractals(NULL, 0, MODE_UPPER, i);

if(res==0 && Fine)//ïîâûøåííàÿ ÷óâñòâèòåëüíîñòü

{

if(HP1HP3 && (LP2>=LP3 || HP2>HPi)) res=HP2;

}

if(FlatShift && res!=0)// ñäâèãàåò ôðàêòàë ôëåòà

while(iHigh(NULL,0,i)==iHigh(NULL,0,i+1)) i++;

ExtMapBuffer1 = res;

if(res!=0 && i==2 && NewFAlert) Alert("Íîâûé âåðõíèé ôðàêòàë "+DoubleToStr(res,Digits));

res= iFractals(NULL, 0, MODE_LOWER, i);

if(res==0 && Fine)

{

if(LP1>LP2&&LP2<LP3&& (HP2<=HP3 || LP2<LPi)) res=LP2;

}

if(FlatShift && res!=0)

while(iLow(NULL,0,i)==iLow(NULL,0,i+1)) i++;

ExtMapBuffer2 =res;

if(res!=0 && i==2 && NewFAlert) Alert("Íîâûé íèæíèé ôðàêòàë "+DoubleToStr(res,Digits));

}

//----

return(0);

}

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

gpociejewski
57
gpociejewski  

[lang=pl]look at atache document. Better way is to use second method i think.

configure your in the way from this doc.

Next only what you need is to use SenMail(string subject, string mail body).

For example (sample from mt4)

double lastclose=Close[0];

if(lastclose<my_signal)

SendMail("from your expert", "Price dropped down to "+DoubleToStr(lastclose,Digits));

I think that is all. PM me or send email : g.pociejewski@luktom.biz if you'll have another questions.

Cheers,

Grzesiek[/lang]

a1arunner:
Can anyone help me add SendMail to this indicator? It alerts just fine but I cannot get it to send an email. My programming skills are very limited. Thank you for any help you can offer!

Mike

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

//| Fine Fractals.mq4 |

//| Copyright © 2009 Äåíèñ Îðëîâ |

//| Денис Орлов - Электронная музыка |

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

#property copyright "Copyright © 2009 Äåíèñ Îðëîâ"

#property link "http://denis-or-love.narod.ru"

#property indicator_chart_window

#property indicator_buffers 2

#property indicator_color1 Red

#property indicator_color2 Green

//---- buffers

double ExtMapBuffer1[];

double ExtMapBuffer2[];

extern bool Fine=True;

extern bool FlatShift=True;

extern bool NewFAlert=False;

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

//| iCustom indicator initialization function |

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

int init()

{

//---- indicators

SetIndexStyle(0, DRAW_ARROW);

SetIndexArrow(0,164);

SetIndexBuffer(0, ExtMapBuffer1);

SetIndexEmptyValue(0, 0.0);

SetIndexStyle(1, DRAW_ARROW);

SetIndexArrow(1, 164);

SetIndexBuffer(1, ExtMapBuffer2);

SetIndexEmptyValue(1, 0.0);

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

IndicatorShortName("Fine Fractals");

SetIndexLabel(0, "iFractalsUp");

SetIndexLabel(1, "iFractalsDn");

//----

return(0);

}

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

//| Custom indicator deinitialization function |

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

int deinit()

{

//----

return(0);

}

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

//| Custom indicator iteration function |

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

int start()

{

int counted_bars = IndicatorCounted();

//----

int limit;

//---- ïîñëåäíèé ïîñ÷èòàííûé áàð áóäåò ïåðåñ÷èòàí

if(counted_bars > 0)

counted_bars--;

limit = Bars - counted_bars;

//---- îñíîâíîé öèêë

for(int i = 2; i < limit; i++)

{

double

HP1=High,HP2=High,HP3=High,HPi=High,

LP1=Low,LP2=Low,LP3=Low, LPi=Low,

res=iFractals(NULL, 0, MODE_UPPER, i);

if(res==0 && Fine)//ïîâûøåííàÿ ÷óâñòâèòåëüíîñòü

{

if(HP1HP3 && (LP2>=LP3 || HP2>HPi)) res=HP2;

}

if(FlatShift && res!=0)// ñäâèãàåò ôðàêòàë ôëåòà

while(iHigh(NULL,0,i)==iHigh(NULL,0,i+1)) i++;

ExtMapBuffer1 = res;

if(res!=0 && i==2 && NewFAlert) Alert("Íîâûé âåðõíèé ôðàêòàë "+DoubleToStr(res,Digits));

res= iFractals(NULL, 0, MODE_LOWER, i);

if(res==0 && Fine)

{

if(LP1>LP2&&LP2<LP3&& (HP2<=HP3 || LP2<LPi)) res=LP2;

}

if(FlatShift && res!=0)

while(iLow(NULL,0,i)==iLow(NULL,0,i+1)) i++;

ExtMapBuffer2 =res;

if(res!=0 && i==2 && NewFAlert) Alert("Íîâûé íèæíèé ôðàêòàë "+DoubleToStr(res,Digits));

}

//----

return(0);

}

//+------------------------------------------------------------------+
vinodh2u
7
vinodh2u  

Please ...need alert added to Laguerre filter indicator

Hi Guru's,

Could you please add an MT4 alert and email alert to this indicator below. This indicator really works good for me to trade on Index.

Appreciate your help...please....

Vinodh

===========

#property copyright "Copyright © 2006, Forex-TSD.com "

#property link "https://www.forex-tsd.com/"

#property indicator_chart_window

#property indicator_color1 Yellow

//---- input parameters

extern double gamma = 0.7;

extern int Price_Type = 0;

//---- buffers

double Filter[];

double L0[];

double L1[];

double L2[];

double L3[];

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

//| Custom indicator initialization function |

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

int init()

{

IndicatorBuffers(5);

//---- indicators

SetIndexStyle(0, DRAW_LINE);

SetIndexDrawBegin(0, 1);

SetIndexLabel(0, "LaguerreFilter");

SetIndexBuffer(0, Filter);

SetIndexBuffer(1, L0);

SetIndexBuffer(2, L1);

SetIndexBuffer(3, L2);

SetIndexBuffer(4, L3);

//----

string short_name="LaguerreFilter(" + DoubleToStr(gamma, 2) + ")";

IndicatorShortName(short_name);

return(0);

}

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

//| Custor indicator deinitialization function |

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

int deinit()

{

return(0);

}

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

//| Custom indicator iteration function |

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

int start()

{

int limit;

int counted_bars = IndicatorCounted();

double CU, CD;

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

if (counted_bars>0)

counted_bars--;

else

counted_bars = 1;

limit = Bars - counted_bars;

//---- computations for RSI

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

{

double Price=iMA(NULL,0,1,0,0,Price_Type,i);

L0 = (1.0 - gamma)*Price + gamma*L0;

L1 = -gamma*L0 + L0 + gamma*L1;

L2 = -gamma*L1 + L1 + gamma*L2;

L3 = -gamma*L2 + L2 + gamma*L3;

CU = 0;

CD = 0;

if (L0 >= L1)

CU = L0 - L1;

else

CD = L1 - L0;

if (L1 >= L2)

CU = CU + L1 - L2;

else

CD = CD + L2 - L1;

if (L2 >= L3)

CU = CU + L2 - L3;

else

CD = CD + L3 - L2;

if (CU + CD != 0)

Filter = (L0 + 2 * L1 + 2 * L2 + L3) / 6.0;

}

return(0);

}

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

=============================================

Mladen Rakic
154497
Mladen Rakic  

That is Laguerre filter and there are probably already versions with what you are looking for (check out this thread among others : https://www.mql5.com/en/forum/173022 )

vinodh_b:
Hi Guru's,

Could you please add an MT4 alert and email alert to this indicator below. This indicator really works good for me to trade on Index.

Appreciate your help...please....

Vinodh

===========

#property copyright "Copyright © 2006, Forex-TSD.com "

#property link "https://www.forex-tsd.com/"

#property indicator_chart_window

#property indicator_color1 Yellow

//---- input parameters

extern double gamma = 0.7;

extern int Price_Type = 0;

//---- buffers

double Filter[];

double L0[];

double L1[];

double L2[];

double L3[];

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

//| Custom indicator initialization function |

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

int init()

{

IndicatorBuffers(5);

//---- indicators

SetIndexStyle(0, DRAW_LINE);

SetIndexDrawBegin(0, 1);

SetIndexLabel(0, "LaguerreFilter");

SetIndexBuffer(0, Filter);

SetIndexBuffer(1, L0);

SetIndexBuffer(2, L1);

SetIndexBuffer(3, L2);

SetIndexBuffer(4, L3);

//----

string short_name="LaguerreFilter(" + DoubleToStr(gamma, 2) + ")";

IndicatorShortName(short_name);

return(0);

}

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

//| Custor indicator deinitialization function |

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

int deinit()

{

return(0);

}

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

//| Custom indicator iteration function |

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

int start()

{

int limit;

int counted_bars = IndicatorCounted();

double CU, CD;

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

if (counted_bars>0)

counted_bars--;

else

counted_bars = 1;

limit = Bars - counted_bars;

//---- computations for RSI

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

{

double Price=iMA(NULL,0,1,0,0,Price_Type,i);

L0 = (1.0 - gamma)*Price + gamma*L0;

L1 = -gamma*L0 + L0 + gamma*L1;

L2 = -gamma*L1 + L1 + gamma*L2;

L3 = -gamma*L2 + L2 + gamma*L3;

CU = 0;

CD = 0;

if (L0 >= L1)

CU = L0 - L1;

else

CD = L1 - L0;

if (L1 >= L2)

CU = CU + L1 - L2;

else

CD = CD + L2 - L1;

if (L2 >= L3)

CU = CU + L2 - L3;

else

CD = CD + L3 - L2;

if (CU + CD != 0)

Filter = (L0 + 2 * L1 + 2 * L2 + L3) / 6.0;

}

return(0);

}

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

=============================================
KingdomVault
102
KingdomVault  

Here's The Indicator.

Thanks for taking your time. God Bless.

traderwawasan_indi_rantai.ex4

johnny2pips
46
johnny2pips  

Can you help me add a signal to this indicator please?

I'm trying to make/follow a system that works for my trading abilities. In order to do that I need to add a sound alert to heiken ashi smoothed.

Can any kind soul add a sound alert for when HA changes color?

Heiken Ash Smoothed

heiken_ashi_smoothed.ex4

If you can help I'd be vary grateful.

Edit: Also if possible to add an arrow along with the sound alert it would help a lot.

Sergey Golubev
Moderator
113459
Sergey Golubev  

This indicator with alert is on this post:

https://www.mql5.com/en/forum/179404

johnny2pips
46
johnny2pips  
newdigital:
This indicator with alert is on this post: https://www.mql5.com/en/forum/179404

Thank you so much Newdigital! This forum rocks, I'll be more active here from now on.