copy_ticks_range don't get new ticks in python

 

Hi,

i'm working in Python. My code get the ticks periodically (from the start of the day to now), filter the new ones and construct my own candle data. The problem is that sometimes the function copy_ticks_range don't get the ticks to now. It stops in a time and don't get new ticks (the return is ever the same array). Look at the print: i send the command twice, and the return is the same. Seems like the connection with Metatrader hangs off.

When I close Metatrader and initialize again, it works again. Someone can help? Thanks.

Files:
forum.png  245 kb