Two issues:
1. Email alert is not functioning
2. Signs in the conclusion of every bar instead of merely signal pub
Thanks in advance for any help!
LCT
https://forexintuitive.com/attachmen...1595302976.mq4
![]() |
![]() |
Two issues:
1. Email alert is not functioning
2. Signs in the conclusion of every bar instead of merely signal pub
Thanks in advance for any help!
LCT
https://forexintuitive.com/attachmen...1595302976.mq4
Hi lct,
email alert is not working since that NewBar() in if (SendAnEmail NewBar()) will always return false.
Look at this NewBar() purpose:
bool NewBar()
static datetime lastbar;
datetime curbar=Timing[0];
if(lastbar! =curbar)
lastbar=curbar;
return(true);
else
return(false);
you should not call NewBar() more than once in a single start() work, since after called, curbar is going to be delegated to lastbar variable (lastbar=curbar), so that at the second call, this illness ( if (lastbar! =curbar) ) will be false.
To solve this problem, you can alter the code as follows:
1. Assign bool xNewBar = NewBar() before loop
bool xNewBar=NewBar(); //put here
for(I=0; ilt;=limitation; I )
....
...
then change
if (AlertOn NewBar()) to if (AlertOn xNewBar)
and
if (SendAnEmail NewBar()) to if (SendAnEmail xNewBar)
it should do the trick
regards
Thank You for the help! Which appears to be working.
Although once I loaded it up the alert window had roughly 30 signs from the last and I obtained an email/text for everybody! Anyway to prevent this when opening the indior?
Thank you again!
Still appear to be receiving a sign after each bar. I attached the updated code, not certain if I entered it correctly.
Thanks,
LCT
https://forexintuitive.com/attachmen...5934228321.mq4
hello,
the correction which I indied is for fix the issue number 1 (email alert isn't working.
About alert which appear after each pub, let's see if I can fix it.
Be back. .
---------
mods attached
https://forexintuitive.com/attachmen...1250042082.mq4
Thanks so much! Seems to be working.
Just how long are you coding? What do you trade?