texcs: I get the alert each time a bar closes
|
|
WHRoeder:
texcs: I get the alert each time a bar closes |
|
The problem with this function is that it gives me the alert signal each time you close a candel and it opens a new one;
Instead of this I need to have the alert signal every time it forms a double minus or a double maxium, only in these two cases.
texcs:
The problem with this function is that it gives me the alert signal each time you close a candel and it opens a new one;
Instead of this I need to have the alert signal every time it forms a double minus or a double maxium, only in these two cases.
WHRoeder has already given you the answer (and you even quoted him), yet you did not do it!
WHRoeder:
texcs: I get the alert each time a bar closes
- Then drop your loop and only look at bars 1 and 2.
for (i = Bars-10; i >= 0; i--)
{
// CercoDoppioMassimo
if (Close[i+2]>Open[i+2] && Close[i+1]<Open[i+1] && Close[i+2]<=(Open[i+1]+Margine*Poin) && Close[i+2]>=(Open[i+1]-Margine*Poin)&& (High[i+2]< High[i+1])&&(Low[i+2]>Low[i+1]))
{
DoppioMassimo[i+1]=High[i+1]+DistanzaFrecciaRib*Poin;
//Alert("Doppio Massimo su "+Symbol()+" a TF "+IntegerToString(Period(),0,0));
}
if (Close[i+2]<Open[i+2] && Close[i+1]>Open[i+1] && Close[i+2]<=(Open[i+1]+Margine*Poin) && Close[i+2]>=(Open[i+1]-Margine*Poin)&&(Low[i+2]> Low[i+1])&&(High[i+2]<High[i+1])&& (Close[i+1]<Open [i+2]))
{
DoppioMinimo[i+1]=Low[i+1]-DistanzaFrecciaRia*Poin;
//Alert("Doppio Minimo su "+Symbol()+" a TF "+IntegerToString(Period(),0,0));0
}
{
// CercoDoppioMassimo
if (Close[i+2]>Open[i+2] && Close[i+1]<Open[i+1] && Close[i+2]<=(Open[i+1]+Margine*Poin) && Close[i+2]>=(Open[i+1]-Margine*Poin)&& (High[i+2]< High[i+1])&&(Low[i+2]>Low[i+1]))
{
DoppioMassimo[i+1]=High[i+1]+DistanzaFrecciaRib*Poin;
//Alert("Doppio Massimo su "+Symbol()+" a TF "+IntegerToString(Period(),0,0));
}
if (Close[i+2]<Open[i+2] && Close[i+1]>Open[i+1] && Close[i+2]<=(Open[i+1]+Margine*Poin) && Close[i+2]>=(Open[i+1]-Margine*Poin)&&(Low[i+2]> Low[i+1])&&(High[i+2]<High[i+1])&& (Close[i+1]<Open [i+2]))
{
DoppioMinimo[i+1]=Low[i+1]-DistanzaFrecciaRia*Poin;
//Alert("Doppio Minimo su "+Symbol()+" a TF "+IntegerToString(Period(),0,0));0
}
double max and double min function has to create a red arrow for any double max and (which do not appear everytime) and 1 green arrow for every double min (which never appear) who help me to fix (i attach the candle which has to recognize the functions)
Files:
texoro: who help me to fix
| Asked and answered twice. |
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello everyone, I have the following function that gives me a allert when when you come to form the double up and double min:
The problem is that the function I from the allert each time you that closes a bar even if it is not a double dip or a double top to me would serve the
allert only when there is a double min or a double top, you know help me?