Abnormal Termination Problem - page 2

 

Why is it that people always tell that it's a virtual machine at the end of the discussion.

This seems to be a trend.

 

try again with 500symbols+


I manage much more intense proceses in kvm.

 
derdigge:

try again with 500symbols+


My broker doesn't offer 500+ symbols.

derdigge:

I manage much more intense proceses in kvm.


It doesn't mean that MT5 is going to behave nicely in kvm.


I suggest the better course of action is you try your code, with your broker, on a normal Windows installation to see if the problem is still there.

I'd also try running the code outside of OnInit() e.g. OnTimer() or OnCalculate(). I can't find a reference for MT5, but possibly OnInit() is taking too long to return. Also, it is not a good place to retrieve rates information.

 

Bootet a Windows now from an ssd laying arround on that machine. The result is the same. 

Wat works is to sleep 500ms every iteration. There is no difference if we are on kvm or native boot.

When i do so the memory is much less filled. So the timeout spoken earlyer off to clear our chartcache is reached by sleeping 500ms.

I will live with a startup time of about 5mins. 


It seems that this is a limit of MT5 ?

 
derdigge:

Bootet a Windows now from an ssd laying arround on that machine. The result is the same. 

Wat works is to sleep 500ms every iteration. There is no difference if we are on kvm or native boot.

When i do so the memory is much less filled. So the timeout spoken earlyer off to clear our chartcache is reached by sleeping 500ms.

I will live with a startup time of about 5mins. 


It seems that this is a limit of MT5 ?


I'd say that having OnInit() take 5 minutes to complete is not the best solution... did you try running it outside of OnInit()?

 

I never used SymbolsTotal(0) always SymbolsTotal(1).

I suppose your calling non live instruments which each have their own timeout period so if you call a lot of them you can get stuck for a long time.

Documentation on MQL5: Market Info / SymbolsTotal
Documentation on MQL5: Market Info / SymbolsTotal
  • www.mql5.com
Market Info / SymbolsTotal - Reference on algorithmic/automated trading language for MetaTrader 5
 

Thanks for all the tips in here. Just for others to come over to a similar journey.

@Marco vd Heijden, i want to fetch all and find matching timeframes to a target automaticaly. So i know what SymbolsTotal(false) is doing ;)

@honest_knave. The abnormal termination is below 5 Mins. I tried it inside OnTick and OnTimer as you have mentioned. Result is the same.


My Solution:

You can run MT5 using Wine within linux. The script runs without the "Sleep Magic" and it turns out that it works faster on my machine.

I am able now to fetch all data in about 35 seconds using a 4 core kvm with 8G ram running arch(deepin desktop) installation inside KVM.

Anyhow there is a magic inside windows causing this behavior, thats the reason i dont like this "operating system". 

Apart from this the deepin Desktop feels better in look&feel. :)

 
derdigge:

Thanks for all the tips in here. Just for others to come over to a similar journey.

@Marco vd Heijden, i want to fetch all and find matching timeframes to a target automaticaly. So i know what SymbolsTotal(false) is doing ;)

@honest_knave. The abnormal termination is below 5 Mins. I tried it inside OnTick and OnTimer as you have mentioned. Result is the same.


My Solution:

You can run MT5 using Wine within linux. The script runs without the "Sleep Magic" and it turns out that it works faster on my machine.

I am able now to fetch all data in about 35 seconds using a 4 core kvm with 8G ram running arch(deepin desktop) installation inside KVM.

Anyhow there is a magic inside windows causing this behavior, thats the reason i dont like this "operating system". 

Apart from this the deepin Desktop feels better in look&feel. :)


I'm glad you got it sorted, and thank you for sharing your solution.

I always noticed that MT4 ran faster on Wine, albeit with some limitations. It sounds like MT5 is the same.

Reason: