This is the line that is causing you problems:
if(InitiateComms == true)(Sleep(CommsTime*100*PeriodSeconds()))
I *think* this is what you want:
void Comms()
{
while(IsTradeAllowed() == true)
{
if(InitiateComms == true)
{
Sleep(CommsTime*100*PeriodSeconds());
SendMail("Looper_BA1",
"n/Balance =" + DoubleToString(AccountBalance(),8) +
"n/Total Balance Growth" + DoubleToString((AccountBalance() - StartBalance),8) +
"n/Equity" + DoubleToString(AccountEquity()) +
"n/Total Balance Growth" + DoubleToString((AccountEquity() - StartEquity),8)) ;
}
}
}
{
while(IsTradeAllowed() == true)
{
if(InitiateComms == true)
{
Sleep(CommsTime*100*PeriodSeconds());
SendMail("Looper_BA1",
"n/Balance =" + DoubleToString(AccountBalance(),8) +
"n/Total Balance Growth" + DoubleToString((AccountBalance() - StartBalance),8) +
"n/Equity" + DoubleToString(AccountEquity()) +
"n/Total Balance Growth" + DoubleToString((AccountEquity() - StartEquity),8)) ;
}
}
}
honest_knave:
This is the line that is causing you problems:
if(InitiateComms == true)(Sleep(CommsTime*100*PeriodSeconds()))
I *think* this is what you want:
void Comms()
{
while(IsTradeAllowed() == true)
{
if(InitiateComms == true)
{
Sleep(CommsTime*100*PeriodSeconds());
SendMail("Looper_BA1",
"n/Balance =" + DoubleToString(AccountBalance(),8) +
"n/Total Balance Growth" + DoubleToString((AccountBalance() - StartBalance),8) +
"n/Equity" + DoubleToString(AccountEquity()) +
"n/Total Balance Growth" + DoubleToString((AccountEquity() - StartEquity),8)) ;
}
}
}
{
while(IsTradeAllowed() == true)
{
if(InitiateComms == true)
{
Sleep(CommsTime*100*PeriodSeconds());
SendMail("Looper_BA1",
"n/Balance =" + DoubleToString(AccountBalance(),8) +
"n/Total Balance Growth" + DoubleToString((AccountBalance() - StartBalance),8) +
"n/Equity" + DoubleToString(AccountEquity()) +
"n/Total Balance Growth" + DoubleToString((AccountEquity() - StartEquity),8)) ;
}
}
}
Hello Honest_knave,
Thank you for your assistance! Your recommendation has eliminated two of my errors, the only one that remains is the " 'SendMail' - Some operator expected".
Any recommendations?
Regards,
GK0135:
I think you missed the ; at the end of the Sleep line?
Hello Honest_knave,
Thank you for your assistance! Your recommendation has eliminated two of my errors, the only one that remains is the " 'SendMail' - Some operator expected".
Any recommendations?
Regards,

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 All,
Just wanted to ask if there is any one willing to help me solve the following issue(I'm still a novice coder). When I compile my code, the following snipbit of code throws out 3 errors as indicated.
void Comms()}
Please help me sort out these issues,
Regards.