kintu11: r sending me non stop emails.
-
Play videoPlease edit your post.
For large amounts of code, attach it.
Don't check for a signal. if(MFIBuffer[1]<OverBought && MFIBuffer[0]>=OverBought) Alert("MFI ...
Check for a change in signal. static bool isBuy=false; bool wasBuy = isBuy; isBuy = MFIBuffer[1]<OverBought && MFIBuffer[0]>=OverBought) if(isBuy && !wasBuy) Alert("MFI ...

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
Any pro in coding? I have email alert for set but this indicator sending me non stop emails. So many that my email did not have any more storage capacity and bouncing back. Can anyone modify or advise how to? I would like to have only 1 alert when the criteria met. Its and MFI indicator. Partial code is below
Thank you in advance.
int start()
{
int i,j,nCountedBars;
double dPositiveMF,dNegativeMF,dCurrentTP,dPreviousTP;
//---- insufficient data
if(Bars<=MFIPeriod) return(0);
//---- bars count that does not changed after last indicator launch.
nCountedBars=IndicatorCounted();
//----
i=Bars-MFIPeriod-1;
if(nCountedBars>MFIPeriod)
i=Bars-nCountedBars-1;
while(i>=0)
{
dPositiveMF=0.0;
dNegativeMF=0.0;
dCurrentTP=(High[i]+Low[i]+Close[i])/3;
for(j=0; j<MFIPeriod; j++)
{
dPreviousTP=(High[i+j+1]+Low[i+j+1]+Close[i+j+1])/3;
if(dCurrentTP>dPreviousTP)
dPositiveMF+=Volume[i+j]*dCurrentTP;
else
{
if(dCurrentTP<dPreviousTP)
dNegativeMF+=Volume[i+j]*dCurrentTP;
}
dCurrentTP=dPreviousTP;
}
//----
if(dNegativeMF!=0.0)
MFIBuffer[i]=100-100/(1+dPositiveMF/dNegativeMF);
else
MFIBuffer[i]=100;
//----
i--;
}
if(AlertMode)
{
if(MFIBuffer[1]<OverBought && MFIBuffer[0]>=OverBought)
Alert("MFI "+MFIPeriod+ ", Sell @ Level "+OverBought+" - "+Symbol()+" M"+Period()+" @ "+DoubleToStr(Bid,Digits)+"");
else if(MFIBuffer[1]>OverSold && MFIBuffer[0]<=OverSold)
Alert("MFI "+MFIPeriod+ ", Buy @ Level "+OverSold+" - "+Symbol()+" M"+Period()+" @ "+DoubleToStr(Bid,Digits)+"");
}
//----
return(0);
}
//+------------------------------------------------------------------+