Discussing the article: "News Trading Made Easy (Part 4): Performance Enhancement"

 

Check out the new article: News Trading Made Easy (Part 4): Performance Enhancement.

This article will dive into methods to improve the expert's runtime in the strategy tester, the code will be written to divide news event times into hourly categories. These news event times will be accessed within their specified hour. This ensures that the EA can efficiently manage event-driven trades in both high and low-volatility environments.

In the previous article, we went through the processes of implementing trades based on the news event's impact. We were successful in this mission, but a key disadvantage to the article's last code was its back-testing speed which is relatively slow. This is mainly due to frequently accessing the database in memory while back-testing the strategy, to resolve this issue we will reduce the number of times the database is accessed during the back-testing procedure. We will get all the information we need from the database in memory for the current day, this means that we will only access the database ideally once per day.

Another method we will utilize to improve performance is to cluster the news events based on their hours, so this means that for each hour of the day, we will have an array that will store event information for a specific hour only. When we need the event information for the current hour if there are any, we will use a switch statement to access the array that holds the event information for the hour that is relevant to the current time. These methods will drastically reduce the runtime of the expert, especially when there are many news events occurring in a specific day or hour. In this article, we will code the building blocks to implement these solutions for later articles to avoid having only one long article.

Author: Kabelo Frans Mampa

 

Hello,

Thank you for this article, could you help me to adding a filter, (filter.csv) containing only the news I would like to trade??

 
Hamid Rabia #:

Hello,

Thank you for this article, could you help me to adding a filter, (filter.csv) containing only the news I would like to trade??

Hello Hamid Rabia, Thank you for your interest in this article. This topic of news filtration will be covered in the upcoming articles, I would like you to be patient.