Automated journaling with MQL4 and Evernote.

Keeping a journal in Evernote is something that has been drummed into me by my trading mentors. I trade automatically for the most part now, but I still want to know what has affected the markets and how my algorithms are doing. Although it’s simple enough to plug MT4 into MyFXBook or similar, it’s nice to be able to put together your own notes. In this example I’ll show you how to create a basic note using MQL4, though similar concepts will work in other systems that support emailing.

What you’ll need…

  • Your Evernote email address, which I’ll explain how to find shortly.
  • MT4 (for this example, you can do something similar in any other trading software that supports emailing).
  • Some basic MQL4 knowledge.

My Evernote email address; What’s that?

Evernote allows you to push notes to your journal via email, although this very useful feature isn’t particularly well advertised in my opinion. To find your Evernote email address, you’ll need to log into your account at Evernote.com. Once you’ve done that, you’ll see your username displayed in the top-left corner of the screen. Click it, and you’ll see the account menu. Once you’ve done this, you’ll see a menu like the one in the picture. Click on Settings.

Once the settings page loads, scroll to the bottom of the page, where you’ll see something similar to this:

Don’t fall into the trap of getting confused between the two email addresses. The one you need for this is at the bottom. Copy this to your clipboard.

Pro tip: Do you receive a weekly events calendar or some other email that you use as part of your preparations? Save yourself some time and redirect/forward that email there too.

Setting up MT4…

 The next step is to set up MT4 for emailing. Open up the software, click Tools and then click Options (or press CTRL + O). When the Options box appears, click on the Email tab. Once you’ve done that, you should see something like this:

Fill in the details (you can find your provider’s SMTP details with Google). Once you’ve done that, send a test email by clicking the Test button. If your message was sent successfully, you’ll see something like this:

A simple note such as the one shown will appear in your notebook:

Great. Now that you’ve gotten this far, you’re ready to think about how you could apply something like this to your Expert Advisors. 

How can I use this in my Experts?

Open up the MetaQuotes Editor by clicking the icon or pressing F4 in MT4. Create a new EA (or open an existing one). In the OnStart section of the boilerplate, add the following code:

void OnStart ( ) {

SendMail ( "MT4", "I just sent a note to Evernote from MT4." );

}

When the Expert Advisor runs, your email will be sent. Well done!

Where can I go from here?

This example has hopefully taught you how to send a basic note from a MT4 Expert Advisor to Evernote. You have set up your Evernote email address and sent a simple line of text to the notebook. From here you can add data calculated or returned from your EA or, as I do, set it up to post at certain specific times. Good luck.

Why are companies so needy these days?

Another day, another request for validation…

If there’s one thing that gets on my nerves these days, it’s being ‘reminded’ by a company that I haven’t given any feedback for their product or service. It’s reached a point at which I can’t even used the toilet without being asked about my ‘experience’. I think back to simpler times fondly – times when I could buy lunch without being asked to complete a survey by the cashier; times when I could buy something on Amazon without being nagged by a seller over an item that cost no more than a fiver. 

It’s like having a needy child, constantly in search of validation. If I don’t wish to tell you about my bus-travelling experience or my recent visit to the bathroom, please don’t chase me up for it. I even received one from an airline the other day, reminding me to give my thoughts on a flight I took back in June! Did it not occur to them that if there was anything particularly memorable about it, I might’ve contacted them sooner? 

It’s so frustrating…

My trading journal setup.

Whenever you’re learning a new skill or improving an existing one, it’s important to track your progress. Since trading is one of the more difficult things you can choose to learn, this especially applies here. I’ve put together a framework using only free software that’ll allow you to get started quickly:

What you’ll need…

Getting started…

Every day it’s important to spend some time thinking about what might happen over the rest of the day. For that reason, I create a hypothesis document in Evernote. I’ve created a regular format for my hypotheses which starts with a daily checklist that asks a number of questions. Remember that trading is a game of discipline: if I don’t meet the criteria, I don’t place trades. The ability to create a list using checkboxes is perfect for this as you can see.

Tracking scheduled events…

Another important section of my journal is the calendar. I’ve set up notifications to my devices to remind me of scheduled events, but I also like to keep a record of every day’s events in my journal. Lightshot allows me to quickly take a screenshot of the appropriate section of the page (as illustrated) which can be copy/pasted into your note on Evernote or saved by pressing Ctrl + S.

Diving into the markets…

At this point in my hypothesis, I can begin to dive into the markets. I open up my trading software (in this case, MT4) and take screenshots of the markets across multiple time horizons as well as of the TPO profile, such as these:

One of the advantages of Lightshot is that it allows me to quickly annotate screenshots once I’ve pressed Print Screen and selected the appropriate section. Here’s one I made earlier:

As you can see, I’ve taken advantage of Lightshot’s features to help me keep a permanent record of my thoughts (good or otherwise!) about the trading day/week. When the annotated screenshot is ready, I can simply paste it into Evernote and it will be saved.

Video recordings…

Lastly I want to mention video recordings. If there is an event-driven element to your trading, this is definitely for you. Take, for instance, a significant but regular event such as the Non-Farm Payrolls. There’s no better way to keep a record of how events like this pan out than video. Flashback Express allows me to record a portion of the screen and add audio commentary if I want to. Also, you could use this method to record entire trading sessions if you like – there’s no better way to gauge your performance and emotions during the day than this. You can even look back and consider things that went well or went wrong; there’s no better learning experience than that.

In conclusion…

I hope I’ve been able to give you an insight into the process of journaling. As I’ve mentioned, it’s vital to track your progress, but it’s also nice to look back through your records and consider how much you’ve developed from time to time. In a forthcoming article, I’ll explain how you can automate elements of this process. This is very useful if, like me, most of your trading is automated. Good luck.

A few improvements.

I know I haven’t posted recently, but I decided to take some time to make a few improvements. Most of them are for my convenience when I post things, but there are a couple of new features:

Code highlighting…

One of the main things I intend to do with this blog is provide a few examples that might help someone (as I did before). I’ve been working on a few things as far as algorithmic trading goes. It might be useful to share my progress on that note, as well as having a discussion in the comments. I have some web development-related things to share in the near future too. The new code highlighting system will help me to keep things organised. Here’s an example:

<?php echo ( 'This is a test' ); ?>

Twitter and Instagram feeds…

I intend to post more regularly on both than I did in the past. I added feeds for both to the side of the page. If you want to follow me, you can do so by clicking the links.

I’ll try to post something of interest by the end of the week. Hopefully it’ll get the ball rolling with regard to a discussion.

Within Temptation – Birmingham O2 Academy – My thoughts

I went along to the O2 Academy in Birmingham to see Within Temptation last Friday. Originally, I planned to see them in Brixton but something else had already come up for that day; I wouldn’t have been able to make it. It’d been a while since I’d seen a band at an O2 venue. I was visiting my parents over the weekend, plus I lucked out and managed to buy a ticket at Viagogo that morning.

The support band…

The support band, Ego Kill Talent, weren’t bad. I didn’t really think they were relevant to the main event as such though. They had a proggy vibe which generally isn’t my thing. It wasn’t really the kind of band I was expecting to see to get me in the mood for a band like Within Temptation. One problem I had (and I don’t think this was necessarily their fault) was that their microphones were poor and it was difficult to hear the vocals properly. On the positive side they had a reasonable stage presence and tried to involve the crowd a little. I rate them a 6/10 – not the worst support band ever but not particularly memorable either.

The main event…

The band came on and played three new songs in a row. This left the atmosphere feeling a little flat in my opinion.  They only played one song from Hydra (which I thought was a crappy album), but they did play some older stuff which I enjoyed. I will say that the set was a little on the short side though and lacked a few classics. One thing they did which I don’t remember them doing before was to run some animated elements on a big screen at the back of the stage. I thought this added a lot of depth to the show. I have to say I teared up a little during Forgiven (I had stuff on my mind that night – I don’t normally do this, ever).

In terms of the effects, it was good, but I’ve seen them play better sets before. Expecting the crowd to listen to three new songs before a familiar one was too much in my humble opinion. Maybe a better balance was needed in that respect. Overall, it was great to see them live again. All in all, I give them a solid 7.5/10.

Summing up…

On the whole it was very enjoyable. The weather sucked when I was waiting in the queue. One thing I’ll say is, don’t use the NCP car park behind the venue if you want to get away quickly. You’ll be stuck on it for around an hour. I didn’t get away until around 11:30. Also, get a burner O2 SIM and put it in your phone; I always used to do that to access the Priority entrance.

I’d post some pictures but my phone decided to shit itself and lose the few I took. It’s a shame really.