Suffering a Bereavement while Trading.

I write this blog post after receiving some sad news from back home, my maternal uncle has passed away. I got the news while I busy on my computer trying to get into the zone for some chart analysis and studying for automated trading. This is the second close person bereavement I have suffered this year. The first one was in first week of January in this Covid ravaged year.

Regarding trading, a lot of emotions go through my head as I sit at the computer. Should I still continue trading? Should I still do my analysis?

I find it hard to focus on trading. In January when I heard the sad news I sat at my desk totally blank. I am currently a discretionary trader so I depend on having a good emotional balance when I analyse the charts. So in January I just switched off my screen and walked away to find other things to occupy my mind.

Now, I have been looking more into automated trading. These two events have cemented the idea in my head that automation of my trading ideas is very key for my future.

What I have learnt is:

  • If an event occurs that messes up your emotional balance, walk away from the screen.
  • Sometimes there are other things more important than trading.
  • Automated trading is essential to have in the pocket.

The Scientific Method in Trading

One of the building blocks to creating consistency in trading is to have consistent processes. Traders can gain leverage by using the scientific method to analyse and assess their trading strategies. I think when we start trading we see it as this whole mess of emotions and as such we might scoff at methods like the scientific method as think they are too restrictive.

I will give the method a go and see how well I do. As with all things trading that I learn, I will probably merge it with something else I have picked up from the myriad of books I read, Kevin Davey has a very good book on algorithmic trading as do other good authors.

For the content below, I generously copied from the very good article here: thoughtco.com/steps-of-the-scientific-method-p2-606045

The scientific method is a systematic way of learning about the world around us and answering questions. The key difference between the scientific method and other ways of acquiring knowledge are forming a hypothesis and then testing it with an experiment.

The Six Steps

The number of steps can vary from one description to another (which mainly happens when data and analysis are separated into separate steps), however, this is a fairly standard list of the six scientific method steps that you are expected to know for any science class:

  1. Purpose/Question Ask the question. In trading, I suppose this is how to I make the profit (I am being simplistic here)
  2. Research
    Conduct background research. Write down your sources so you can cite your references. In the modern era, a lot of your research may be conducted online. Scroll to the bottom of articles to check the references. Even if you can’t access the full text of a published article, you can usually view the abstract to see the summary of other experiments. Interview experts on a topic. The more you know about a subject, the easier it will be to conduct your investigation.
  3. Hypothesis
    Propose a hypothesis. This is a sort of educated guess about what you expect. It is a statement used to predict the outcome of an experiment. Usually, a hypothesis is written in terms of cause and effect. Alternatively, it may describe the relationship between two phenomena. One type of hypothesis is the null hypothesis or the no-difference hypothesis. This is an easy type of hypothesis to test because it assumes changing a variable will have no effect on the outcome. In reality, you probably expect a change but rejecting a hypothesis may be more useful than accepting one.
  4. Experiment
    Design and perform an experiment to test your hypothesis. An experiment has an independent and dependent variable. You change or control the independent variable and record the effect it has on the dependent variable. It’s important to change only one variable for an experiment rather than try to combine the effects of variables in an experiment. For example, if you want to test the effects of light intensity and fertilizer concentration on the growth rate of a plant, you’re really looking at two separate experiments.
  5. Data/AnalysisRecord observations and analyze the meaning of the data. Often, you’ll prepare a table or graph of the data. Don’t throw out data points you think are bad or that don’t support your predictions. Some of the most incredible discoveries in science were made because the data looked wrong! Once you have the data, you may need to perform a mathematical analysis to support or refute your hypothesis.
  6. Conclusion
    Conclude whether to accept or reject your hypothesis. There is no right or wrong outcome to an experiment, so either result is fine. Accepting a hypothesis does not necessarily mean it’s correct! Sometimes repeating an experiment may give a different result. In other cases, a hypothesis may predict an outcome, yet you might draw an incorrect conclusion. Communicate your results. The results may be compiled into a lab report or formally submitted as a paper. Whether you accept or reject the hypothesis, you likely learned something about the subject and may wish to revise the original hypothesis or form a new one for a future experiment.

When Are There Seven Steps?

Sometimes the scientific method is taught with seven steps instead of six. In this model, the first step of the scientific method is to make observations. Really, even if you don’t make observations formally, you think about prior experiences with a subject in order to ask a question or solve a problem.

Formal observations are a type of brainstorming that can help you find an idea and form a hypothesis. Observe your subject and record everything about it. Include colors, timing, sounds, temperatures, changes, behavior, and anything that strikes you as interesting or significant.

Variables

When you design an experiment, you are controlling and measuring variables. There are three types of variables:

  • Controlled Variables: You can have as many controlled variables as you like. These are parts of the experiment that you try to keep constant throughout an experiment so that they won’t interfere with your test. Writing down controlled variables is a good idea because it helps make your experiment reproducible, which is important in science! If you have trouble duplicating results from one experiment to another, there may be a controlled variable that you missed.
  • Independent Variable: This is the variable you control.
  • Dependent Variable: This is the variable you measure. It is called the dependent variable because it depends on the independent variable.

Helmenstine, Anne Marie, Ph.D. “Six Steps of the Scientific Method.” ThoughtCo, Aug. 27, 2020, thoughtco.com/steps-of-the-scientific-method-p2-606045.

Using Neural Networks for Trading

I have long been fascinated by using AI to help with stuff. My vague memory from final year software project was working on a fuzzy logic credit rating system. Unfortunately at the time my supervisors didn’t seem to have a good appreciation of how all this stuff hung up together.

Now I am trading and from manual trading I am observing some patterns where I say “oh hang on, that looks like a pattern which I can get a computer to do for me”. The problem though as if often the case is either I am time poor to go through the development and test or I need more skills than I have to code the strategy.

So I was pleasantly surprised when I discovered someone had done the hard work of writing a book called Neuronet trading system Meta Trader 4 and MATLAB. Step-by-step development written by Andrey Dibrov. and it even has a 2nd edition or you can buy on the ubiquitous Amazon (Russian copy). The book at the time I bought it is going for 480 Russian Rubbles which comes to about £4.90 on the non Amazon website, not bad. A warning though, the books doesn’t come with all the scripts and you have to source then from Andrey. My only problem at this time is that it’s in Russian but thanks to the wonders of the computer + internet I can use the translation services which abound to go through what Andrey is on about.

So here is “God speed” to the Holy Grail seeker, I hope I have found one of the tools that will help me in my grail quest.

Check Higher Timeframes

So I took a trade on the M5 chart for Fiber. I got a somewhat good Setup 1 signal but I did not check the higher timeframe.

I got stopped out of this trade. On reflection and checking if there was anything I could have done, I then saw that I could have checked the higher timeframe other than the M30 chart that I was using. I should have also checked out the length of the last up move to adjust my confidence.

The M30 showed me that the prices were in a range going towards the Alligator.

When I checked the H1 chart, it is even clearer (in hindsight) that the prices were in a range so my Setup 1 entry even though it was a valid setup was not the best entry position.

Lesson learnt: Check other timeframes before entering positions.

Useful MT4 Shortcuts

This is a list of useful MT4 shortcuts that I will need either during analysis or manual trading.

F1 — open this “Userguide”;
F2 — open the “History Center” window;
F3 — open the “Global Variables” window;
F4 — download MetaEditor;
F5 — switch to the next profile;
F6 — call the “Tester” window for testing the expert attached to the chart window;
F7 — call the properties window of the expert attached to their chart window in order to change settings;
F8 — call the chart setup window;
F9 — call the “New Order” window;
F10 — open the “Popup prices” window;
F11 — enable/disable the full screen mode;
F12 — move the chart by one bar to the left;
Shift+F12 — move the chart by one bar to the right;
Shift+F5 — switch to the previous profile;
Alt+1 — display the chart as a sequence of bars (transform into bar chart);
Alt+2 — display the chart as a sequence of candlesticks (transform into candlesticks);
Alt+3 — display the chart as a broken line (transform into line chart);
Alt+A — copy all test/optimization results into the clipboard;
Alt+W — call the chart managing window;
Alt+F4 — close the client terminal;
Alt+Backspace or Ctrl+Z — undo object deletion;
Ctrl+A — arrange all indicator windows heights by default;
Ctrl+B — call the “Objects List” window;
Ctrl+C or Ctrl+Insert — copy to the clipboard;
Ctrl+E — enable/disable expert advisor;
Ctrl+F — enable “Crosshair”;
Ctrl+G — show/hide grid;
Ctrl+H — show/hide OHLC line;
Ctrl+I — call the “Indicators List” window;
Ctrl+L — show/hide volumes;
Ctrl+P — print the chart;
Ctrl+S — save the chart in a file having extensions: “CSV”, “PRN”, “HTM”;
Ctrl+W or Ctrl+F4 — close the chart window;
Ctrl+Y— show/hide period separators;
Ctrl+Z or Alt+Backspace — undo the object deletion;
Ctrl+D — open/close the “Data Window”;
Ctrl+M — open/close the “Market Watch” window;
Ctrl+N — open/close the “Navigator” window;
Ctrl+O — open the “Setup” window;
Ctrl+R — open/close the “Tester” window;
Ctrl+T — open/close the “Terminal” window;
Ctrl+F6 — activate the next chart window;
Ctrl+F9 — open the “Terminal — Trade” window and switch the focus into it. After this, the trading activities can be managed with keyboard.

MT4 VPS or Own Hosting?

Like most people (I think so), I use a laptop for my everyday stuff unlike years ago when I used to have a desktop. The question that comes up when you have the trading dream is how to 24/7 monetise the holy grail when I find it? When you search online you will find options for Virtual Private Server (VPS). This will be either dedicated remote Windows server or the MQL own VPS service, or maybe something else.

Now I have looked at the option of using Microsoft Azure, Amazon and some other service to host my MT4/MT5 bots. But I have chosen to host my MT4 trading machine at home. The main reason for this is that I did not want to break the bank on this one so I went for a used pc which I got on Ebay. I bought an HP G1 600 mini pc for £130. The plan is to use this machine only for trade execution. For development and research purposes I have my Dell Precision 7520 beast with Xeon and 64GB RAM.

HP G1 600 Mini pc

The machine has good specs as seen below.

The only thing I changed was the hard drive, from 128 GB SSD to a Crucial 1TB SSD which I bought on Amazon for £95. I have tweaked the computer settings so that the machine does not switch off, and have disabled automatic restarts after updates.

Once I finished installing all the latest Windows updates, I also installed the MT4 and MT5 software.

Other Software I have installed:

  • Malware Bytes
  • Microsoft Visual Studio Code
  • Python

Trading Back in the Mix with Bill Williams Methodology

Anyone who has used MT4 will be familiar with the Bill Williams indicators. I discovered his methods a couple of years ago through my friend https://www.forexfactory.com/tafadzwa02

I am now thinking of dabbling with his ideas again. With Covid inspired lockdown and working from home there is time to do other things than commuting down the A14 or on the train to London. So what better thing to do than reboot/restart my trading ambitions.

I will be using the AIMS by Immy process which is a derivative of Bill Williams to do my trading this time around. I will still refer to the Bill Williams books. Immy also has a Youtube channel which folks can follow if they are interested in knowing how he does his trading.