Awhile back, while trading RT, we have had the exact same problem but never managed to definitively pinpoint the problem. Strange thing was that among different traders, trading the same code, the problem would occur for some but not others. We assumed it must be RT data related. We were scanning a large number of stocks in RT, starting before RTH. On some days it just didn’t work other days it worked flawless. It was quite frustrating.
We assumed the system was waiting for backfill. Try turning off backfill, or even switch your db to local as a diagnostic.
Herman, with all due respect, how could you possibly tell that you had “exact same problem”???
You don’t know:
a) the formula he is using
b) you don’t even know if he uses RT streaming source at all
c) even if he is using RT source you don’t know WHICH ONE (different sources use different plugins and different plugins have different code and different behaviour)
He provided ZERO details, yet expect the guidance.
I don’t know why people are so quick in their assumptions. It is beyond my imagination.
The fact that you have say cough does not mean that you automatically have lung cancer. Single symptom != disease.
Generally GUI (including header information) is updated "on idle", when CPU is not particularly busy. This is to ensure that GUI refreshes do NOT slow down processing.
At least ONE COMPLETED STEP is required for progress bar to display any meaningful estimate. This is so because time estimate is TotalNumberOfSteps * (CompletedStepsTotalTime/NumberOfCompletedSteps). This does not happen in your case because your code executes very long for very first step (symbol) and this does not allow to provide you with time estimates. Your NumberOfCompletedSteps is ZERO and there is no meaningful estimate possible.
I almost never have codes that execute slower than 0.1 second per symbol so I never saw this but will add "estimate not available yet as first step hasn't completed" message so people doing long first step would see that instead.
Update: I made experiment and wrote a code that specifically WAITS long:
If( Status("stocknum") == 0 )
// just wait for 30 seconds doing nothing
for( i = 0; i < 30; i++ ) ThreadSleep( 1000 );
Buy = 0;
and here is how it looks on my end
So that raises a question: which version of AmiBroker you are using? Because I remember that I already made some changes in 6.16 to the way how this progress is displayed.