Closed i3130002 closed 3 years ago
Hi i3130002, thank you for your message.
Unfortunately, it is not possible yet to use python code on their strategy tester. However, I do have planned to build one strategy tester to help python coders to check how well their strategies are working, but I do not know when I will be able to do it.
To handle events I use a while loop that calls the MT5 API that returns the most recent tick. I use "time" to check the last tick time, and if it is different from the previous tick, it is a new tick and I have the event handler.
time = 0
while True:
# Business logic.
time = tick.time_msc
If you prefer, it is possible to use a timer to call the functions inside the while over a fixed time.
If you have any other questions I am always glad to help.
Thank you.
Is there a way to back test an strategy using strategy tester? If not what other ways one can use?
What about other events (like next tick)?
By the way, thanks for sharing. Most people tend not to share :heart: