Stylianos:
Please edit your post.Hello,
i created an Expert Advisor for an offline chart that looks like the following code:
<SNIP>
After some minutes the message "i am alive" was stopped.
Is there is something i can do about it or as i read in some other topics, it is a problem of every offline chart EA?
Thank you very much
Please use this to post code . . . it makes it easier to read.
You need tick for an EA to run, start() is called when a tick arrives. An offline chart is offline so no tick arrive . . . so you need something to send ticks to the offline chart. Use the search and you will find may discussions on this subject.
int init() { start(); return(0); } int start() { while (!IsStopped()) { RefreshRates(); //execution code Sleep(1000); //print each 5 mins a message "i am alive" } return(0); }
Here is the code by using the SRC button...thanks RaptorUK. With this code i receive tick data since i call the RefreshRates() in the beginning of each loop. The problem is that after some time i don't see the "i am alive" message which means that the loop has stopped its execution
Stylianos:
No, its not like that. "Offline charts" are known as offline for a reason. If code is working fine online but not offline, then it means refreshrates are not helping...its simple..
Here is the code by using the SRC button...thanks RaptorUK.
With this code i receive tick data since i call the RefreshRates() in the beginning of each loop.
The problem is that after some time i don't see the "i am alive" message which means that the loop has stopped its execution
dineshydv:
No, its not like that. "Offline charts" are known as offline for a reason. If code is working fine online but not offline, then it means refreshrates are not helping...its simple..
No, its not like that. "Offline charts" are known as offline for a reason. If code is working fine online but not offline, then it means refreshrates are not helping...its simple..
RefreshRates() is working fine for some minutes...the problem is that the EA hangs after a while. I see the "i am alive" message for 2-3 times (message appears every 5 mins) but then it appears no more!

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,
i created an Expert Advisor for an offline chart that looks like the following code:
int init()
{
start();
return(0);
}
int start()
{
while (!IsStopped())
{
RefreshRates();
//execution code
Sleep(1000);
//print each 5 mins a message "i am alive"
}
}
After some minutes the message "i am alive" was stopped.
Is there is something i can do about it or as i read in some other topics, it is a problem of every offline chart EA?
Thank you very much