Main menu


A Forex trading method that is equally effective for trading bitcoin

A Forex trading method that is equally effective for trading bitcoin

You may already be aware that trading between currency pairings takes place on the Foreign Exchange (Forex, or FX) market. You folks might not know, nevertheless, that the world's most liquid industry is the information technology sector.


I started out in the area of Forex algorithmic trading a few years ago by opening a demo account and using fake money to play out simulations on the Meta Trader 4 trading platform. This was motivated by my curiosity.


A Forex trading method that is equally effective for trading bitcoin

After a week of "trading," my funds had almost doubled. My own profitable algorithmic trading served as a driving force for me to conduct additional research and finally sign up for various FX forums. Soon, I was spending hours reading about algorithmic trading systems (rule sets that determine if your lot should buy or sell), custom indicators, market sentiments, and other topics.


My First Customer

Coincidentally, at this time, I found out that a software engineer was needed to automate a simple trading method. When I was a college student back then, I was studying concurrent programming in Java (threads, semaphores, and all that nonsense). Because I believed that this automated system couldn't possibly be more difficult than the assignments I had to complete for my advanced data science course, I applied for the position and joined.


The client requested MQL4-based algorithmic trading software. MQL4 is a functional programming language that the Meta Trader 4 platform employs to carry out stock-related operations.


Since then, MQL5 has been released. It addresses some of MQL4's issues and has additional built-in features, which simplifies life as you may anticipate.


Linking up with a Forex banker is the purpose of the trading platform (in this case, Meta Trader 4). Your buy and sell orders are then carried out by the broker utilising a technology that uses real-time market data. For individuals who are unfamiliar with forex trading, the following information has been taken from the information stream:


All of this data is accessible through Meta Trader 4 and is available at a variety of timeframes, including: every infinitesimal (M1), every five minutes (M5), M15, M30, every hour (H1), H4, D1, W1, and MN.


A tick is a unit of measurement for the price of electric current. A tick, then, is a change in the bid or ask price for a currency pair. There may be many ticks per second during active markets. There may go for several minutes without a tick during quiet markets.


When you locate a club, you can buy or sell a specific book using that site's specific money. Additionally, you raise the take-profit and stop-loss limits. The stop-loss limit is the most pips (toll variants) you are ready to lose before closing a deal. The entire number of pip points you can accumulate prior to cashing out is the maximum accept-profit amount.


Visit this page to learn more about the fundamentals of trading, including pips, club kinds, spread, slippage, market orders, and more.


The client's simple algorithmic trading requirements were for a Forex robot built on the basis of two indicators. Background: Indicators, which are based on historical data (e.g., the highest toll value in the most recent northward days), are highly helpful when trying to identify a market situation and brand trading judgments.


Several are connected to Meta Trader 4. But my buyer was primarily intrigued by the signals generated by a certain trading strategy. Only when two of their unique indicators crossed each other in the fourth dimension did they aim to trade at particular angles.


Hands On

I discovered that MQL4 applications have the following structure as I got my hands dirty:

  • [Preprocessor Directives].
  • [Init Function].
  • [External Parameters].
  • [Global Variables].
  • [Deinit Role].
  • [First Role].
  • [Custom Functions].


Since it is used every time the market moves, the start office is the brains of every MQL4 programme (ergo, this function will execute one time per tick). Regardless of the timeframe you choose, this is the example. For example, even if your team might be working within the H1 (one hour) period, the starting time role would run tens of thousands of times each timeframe.



When I developed my algorithmic trading system, I was interested in two things: 1) if it was acting appropriately, and 2) whether the Forex trading strategy it employed was in any way effective.


MT4 comes with a useful tool for backtesting Forex trading strategies, though these days there are more capable, professional tools out there. The tool will simulate each tick with the knowledge that it must open at a specific cost, close at a specific cost, and hit certain highs and lows for each unit. Setting up your timelines and running your programme in simulation initially are both required.


You'll be able to tell whether or not the programme is operating appropriately after comparing its activities to historical prices. His choice of indicators and reasoning for drawing conclusions were unsuccessful.


I had backtested the FX robot and looked at its return ratio for a few arbitrary time periods. Needless to say, I understood that my client wasn't going to get rich with it because the indicators he had chosen and the decision logic were losing trades. Here are some examples of the outcomes from applying the strategy to 164 operations in the M15 window:


Keep in mind that our balance (the blue line) ends below where it began.

One warning: It's not always accurate to declare if a company is "profitable" or "unprofitable." Systems frequently have phases of (un)profitability dependent on the "mood" of the market, which can be represented by a variety of chart patterns:


Optimisation of Parameters: Lies Although backtesting had left me dubious about the efficacy of this FX robot, my interest was piqued when I began successfully tinkering with its external parameters and noticed notable changes in the Render Ratio as a whole. This particular branch of science is known as parameter optimisation.


I conducted some rudimentary research to try to determine the impact of the external parameters on the return ratio, and the results were as follows: Alternatively, tidy:


You might believe, as I did, that you ought to use Parameter A. However, the choice isn't always as obvious as it may seem. Note in particular how unpredictable Parameter A is: at low fault values, its render drastically alters. In other words, Parameter A is very likely to overestimate results in the future because any uncertainty or shift at all would lead to subpar performance.


That much is true: the future is unclear. As a result, it is also uncertain whether Parameter A will come back. Actually, the ideal strategy is usually to rely on uncertainty. Having a parameter with a lower maximum return but better predictability (less volatility) is generally preferred to having one with a higher render but less predictability.


The only thing you can be sure of is that you don't know how the market will behave in the future; assuming that you do based on historical data is a mistake. Your Forex forecasts must include this uncertainty in return.


It is a mistake to assume you can predict how the market will behave based on historical data.


This is just to demonstrate how optimising parameters can lead to tests that overstate likely future results and that such thinking is not clear. This does not imply that we should apply Parameter B because, on average, Parameter A's lower returns outperform Parameter B.


Overall Forex Algorithmic Trading Considerations

I've developed multiple automated trading systems for clients since my first showtime algorithmic Forex trading experience, and I can assure you that there is still opportunity for exploration and more in-depth Forex analysis. For instance, I just developed a strategy focused on identifying so-called "Large Fish" movements, or large pips fluctuations in really little time intervals. I find this topic to be fascinating.


Building your own FX simulation company is a fantastic choice for learning more about Forex trading, and the options are nearly limitless. You could, for instance, attempt to determine the probability distribution of price variations as a function of volatility in a single market (such as EUR/USD) and then possibly create a Monte Carlo simulation model using the distribution for each country's level of volatility, using whatever level of accuracy you desire. I'll leave this as a challenge for the interested reader.


The forex market can be intimidating at times, but I guarantee that this article has provided you with some tips on where to begin when developing your own forex trading strategy.


Further Reading

There are several tools available today to create, test, and improve Trading System Automations, including OCaml programming, Trading Blox testing, and NinjaTrader trading.


I've read a lot about the enigmatic realm of the currency market. Here are a few articles I suggest for programmers and passionate readers:


  • Further ReaThe Way of the Turtle, past Curtis Religion: This ane, in my opinion, is the.
  • BabyPips: This is the starting bespeak if you don’t know squat about Forex trading.
  • Constance M. Dark-Technical brown's Assay for the Trading Professional: Strategies and Techniques for Today's Volatile Global Financial Markets.
  • Andrew R. Young's book, Skilled Advisor Programming: Developing Automatic Trading Systems in MQL for Meta Trader 4.
  • Urban Jeckle and Emilio Tomasini's Trading Systems: A New Approach to System Evolution and Portfolio Optimisation: extremely technical and devoted to FX testing.
  • Past Rui Pedro Barbosa and Orlando Belo: A Step-by-Step Implementation of a Multi-Agent Currency Trading System This guy, who describes how you might develop a trading arrangement and testing platform, is quite professional.


Source: https //www toptal com