Sorry for the screwed up formatting of the code above... I forgot to tag it. And for some screwed up reason, I'm not allowed to edit or delete my own post.

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
Can anyone tell me how RefreshRates() works behind the scene?
I'm trying to solve a problem I'm having and so I created a loop to insure that the data is fresh... but what I'm finding is that it is spending a lot of time waiting of this call to come back TRUE.
Here is the loop... how is RefreshRates() supposed to work?
bool bRefreshData()
{
bool bRanOnce=FALSE;
while(!RefreshRates())
{
if(!bRanOnce)
{
Print("Data on client is not current. Waiting for update..");
Sleep(1000);
}
bRanOnce=TRUE;
}
return(TRUE);
}