... Show your code
phy:
int LIVE = 22;... Show your code
while(AccountNumber() == LIVE)
{
if(AccountProfit()<AccountMargin())
SendMail(" ", " "+AccountProfit());
Sleep(5000);
}
I really can't understand what you are saying, but...
While your account number is 22 you are trapped in the loop. If your profit is less than your margin it also sends mail. There is no exit from the loop.
int LIVE = 22; while(AccountNumber() == LIVE) { if(AccountProfit()<AccountMargin()) SendMail(" ", " "+AccountProfit()); Sleep(5000); }
while to if
phy:
i just wont that my EXPERT ADVISOR IS CHECKING MY ACCOUNT EVERY (IN THIS CASE 5 SEC.) AND IF ACCOUNT PROFIT IS < ACCOUNT MARGIN)
I WONT TO KNOW THAT. I WONT SMS FOR THIS.
WHAT YOU MEAN WHILE TO IF
I really can't understand what you are saying, but...
While your account number is 22 you are trapped in the loop. If your profit is less than your margin it also sends mail. There is no exit from the loop.
int LIVE = 22; while(AccountNumber() == LIVE) { if(AccountProfit()<AccountMargin()) SendMail(" ", " "+AccountProfit()); Sleep(5000);
DxdCn:
while to if
I KNOW THAT I'M TRAPPED IN THE LOOP AND IT'S OK.while to if
i just wont that my EXPERT ADVISOR IS CHECKING MY ACCOUNT EVERY (IN THIS CASE 5 SEC.) AND IF ACCOUNT PROFIT IS < ACCOUNT MARGIN)
I WONT TO KNOW THAT. I WONT SMS FOR THIS.
WHAT YOU MEAN WHILE TO IF
}
Check first with Print() how often it will print, maybe if you dont have AccountProfit()<AccountMargin()
it dont must to print, and if its all ok with Print, then look at Sendmail and so you go step by step to find a error.
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
but when i change alert with sendmail it's going crazy.
i'm getting messages every 1 second even i set up sleep function for 20 sec.
when i close my expert advisor (after i do compile) and my trade station mt4, and then go back to mt4 my alert advisor
is activated but sendmail is no ok!!!!
why??