have tried to make the arrow appear after the close of the
signal candle in other to avoid repainting but all to no avail.please help me out MR. TOOLS and MLADEN, below is the code.
//+------------------------------------------------------------------+//| signalindicator.mq4 |//| Copyright 2015, MetaQuotes Software Corp. |//| https://www.mql5.com |//+------------------------------------------------------------------+#property copyright"Copyright 2015, MetaQuotes Software Corp."#property link"https://www.mql5.com"#property version"1.00"#property strict#property indicator_chart_window#property indicator_buffers4#property indicator_color1 Blue
#property indicator_color2 Yellow
#property indicator_color3 Aqua
#property indicator_color4 Red
externint FastEMA = 5;
externint SlowEMA = 6;
externint RSIPeriod = 7;
externbool Alerts = TRUE;
double buffer_1[];
double buffer_2[];
double arrow_1[];
double arrow_2[];
int a = 0;
int b = 0;
double x = 0.0;
double y = 0.0;
int init() {
SetIndexStyle(0, DRAW_LINE);
SetIndexBuffer(0, buffer_1);
SetIndexStyle(1, DRAW_LINE);
SetIndexBuffer(1, buffer_2);
SetIndexStyle(2, DRAW_ARROW, 0,4);
SetIndexArrow(2, 217);
SetIndexBuffer(2, arrow_1);
SetIndexEmptyValue(2, 0.0);
SetIndexStyle(3, DRAW_ARROW, 0,4);
SetIndexArrow(3, 218);
SetIndexBuffer(3, arrow_2);
SetIndexEmptyValue(3, 0.0);
return (0);
}
int deinit() {
return (0);
}
int start() {
int counted_bars = IndicatorCounted();
double irsi_1 = 0;
bool c = FALSE;
double price_10 = 0;
if (counted_bars < 0) return (-1);
if (counted_bars > 0) counted_bars--;
int li_0 = Bars - counted_bars;
for (int i = 0; i < li_0; i++) {
buffer_1[i] = iMA(NULL, 0, FastEMA, 0, MODE_EMA, PRICE_CLOSE, i);
buffer_2[i] = iMA(NULL, 0, SlowEMA, 0, MODE_EMA, PRICE_CLOSE, i);
irsi_1 = iRSI(NULL, 0, RSIPeriod, PRICE_CLOSE, i);
x = buffer_1[i] - buffer_2[i];
if (x > 0.0 && irsi_1 > 50.0) a = 1;
elseif (x < 0.0 && irsi_1 < 50.0) a = 2;
if (a == 1 && b == 2) {
arrow_2[i - 1] = High[i - 1] - 5.0 * Point;
c= TRUE;
price_10 = Ask;
} else {
if (a == 2 && b == 1) {
arrow_1[i - 1] = Low[i - 1] - 5.0 * Point;
c = TRUE;
price_10 = Bid;
}
}
b = a;
y = x;
}
if (Alerts && c) {
PlaySound("alert.wav");
if (b == 2) Alert(Symbol()," M",Period(),"Buy at " + price_10 + "!!", "Entry Point", 0);
elseif (b == 1) Alert(Symbol()," M",Period(),"Sell at " + price_10 + "!!", "Entry Point", 0);
c= FALSE;
}
return (0);
}
have tried to make the arrow appear after the close of the
signal candle in other to avoid repainting but all to no avail.please help me out MR. TOOLS and MLADEN, below is the code.
kapoo
Be aware that that indicator is repainting, You should use some version that does not repaint
Serían tan amables de poner la siguiente alerta a este indicador: alertson, alertsOnCurrent, alertsMessage, alertsSound, alertsNotify, alertsEmail, SoundFile, ShowArrows, arrowsUpperGap, arrowsLowerGap.
Así alertas que se cumplan las condiciones sólo deben mostrar flechas Cuando el ayuno (14,3,3) se encuentra en niveles de sobreventa estocásticos (por debajo de 20) y la línea de% K cruza por encima de la línea% D del y cuando a la segunda estocástico lento ( 21,9,9) se encuentra en niveles de sobreventa (por debajo de 20) y la línea de% K cruza por encima de la línea% D el, tenemos una señal de compra llamadas.
Cuando el estocástico rápido y lento se encuentra en niveles de sobrecompra (por encima de 70) y la línea% K cruza por debajo de la línea% D Tenemos una señal para comprar puts.
Muchas gracias por toda la ayuda.
Dear mladen can you please take a look at my post?. Thank you in advance for your help.
They would be so kind as to add the following alert to this indicator: alertson, alertsOnCurrent, alertsMessage, alertsSound, alertsNotify, alertsEmail, SoundFile, ShowArrows, arrowsUpperGap, arrowsLowerGap.
So that the conditions are met alerts should only show arrows When the fast (14,3,3) is at oversold stochastic levels (below 20) and the% K line crosses above the% D line the and when to the second slow stochastic (21,9,9) is at oversold levels (below 20) and the% K line crosses above the% D line the, We have a signal to buy calls.
When the fast and slow stochastic is at overbought levels (above 70) and the% K line crosses below the% D line We have a signal to buy puts.
Thanks alot for all the help.
Dear mladen can you please take a look at my post?. Thank you in advance for your help.
have tried to make the arrow appear after the close of the signal candle in other to avoid repainting but all to no avail.please help me out MR. TOOLS and MLADEN, below is the code.
have tried to make the arrow appear after the close of the signal candle in other to avoid repainting but all to no avail.please help me out MR. TOOLS and MLADEN, below is the code.
kapoo
Be aware that that indicator is repainting, You should use some version that does not repaint
kapoo
Be aware that that indicator is repainting, You should use some version that does not repaint
please help me with the version sir
k sir.
Mr Mladen, Please look at the below codes , the arrow doesnt show up in live until i switched time frame.
Mr. Mladen, please look at the below codes , the arrow doesnt come up in live until i switched time frame.
Hola Mladen,
Serían tan amables de poner la siguiente alerta a este indicador: alertson, alertsOnCurrent, alertsMessage, alertsSound, alertsNotify, alertsEmail, SoundFile, ShowArrows, arrowsUpperGap, arrowsLowerGap.
Así alertas que se cumplan las condiciones sólo deben mostrar flechas Cuando el ayuno (14,3,3) se encuentra en niveles de sobreventa estocásticos (por debajo de 20) y la línea de% K cruza por encima de la línea% D del y cuando a la segunda estocástico lento ( 21,9,9) se encuentra en niveles de sobreventa (por debajo de 20) y la línea de% K cruza por encima de la línea% D el, tenemos una señal de compra llamadas.
Cuando el estocástico rápido y lento se encuentra en niveles de sobrecompra (por encima de 70) y la línea% K cruza por debajo de la línea% D Tenemos una señal para comprar puts.
Muchas gracias por toda la ayuda.
Dear mladen can you please take a look at my post?. Thank you in advance for your help.
https://www.forex-tsd.com/forum/debates-discussions/13027-indicators-with-alerts-signal/page906#comment_1808731
Hi Mladen,
They would be so kind as to add the following alert to this indicator: alertson, alertsOnCurrent, alertsMessage, alertsSound, alertsNotify, alertsEmail, SoundFile, ShowArrows, arrowsUpperGap, arrowsLowerGap.
So that the conditions are met alerts should only show arrows When the fast (14,3,3) is at oversold stochastic levels (below 20) and the% K line crosses above the% D line the and when to the second slow stochastic (21,9,9) is at oversold levels (below 20) and the% K line crosses above the% D line the, We have a signal to buy calls.
When the fast and slow stochastic is at overbought levels (above 70) and the% K line crosses below the% D line We have a signal to buy puts.
Thanks alot for all the help.
Dear mladen can you please take a look at my post?. Thank you in advance for your help.
https://www.mql5.com/en/forum/180648/page906